feat: add course field for ORA flex peer override (#32594)
* feat: add course field for ORA flex peer override * style: quality * style: remove auto import
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.2.19 on 2023-06-28 13:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('course_overviews', '0027_auto_20221102_1109'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='courseoverview',
|
||||
name='force_on_flexible_peer_openassessments',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='historicalcourseoverview',
|
||||
name='force_on_flexible_peer_openassessments',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
@@ -64,7 +64,7 @@ class CourseOverview(TimeStampedModel):
|
||||
app_label = 'course_overviews'
|
||||
|
||||
# IMPORTANT: Bump this whenever you modify this model and/or add a migration.
|
||||
VERSION = 18
|
||||
VERSION = 19
|
||||
|
||||
# Cache entry versioning.
|
||||
version = models.IntegerField()
|
||||
@@ -144,6 +144,9 @@ class CourseOverview(TimeStampedModel):
|
||||
entrance_exam_id = models.CharField(max_length=255, blank=True)
|
||||
entrance_exam_minimum_score_pct = models.FloatField(default=0.65)
|
||||
|
||||
# Open Response Assessment configuration
|
||||
force_on_flexible_peer_openassessments = models.BooleanField(default=False)
|
||||
|
||||
external_id = models.CharField(max_length=128, null=True, blank=True)
|
||||
|
||||
language = models.TextField(null=True)
|
||||
@@ -268,6 +271,8 @@ class CourseOverview(TimeStampedModel):
|
||||
else:
|
||||
course_overview.entrance_exam_minimum_score_pct = course.entrance_exam_minimum_score_pct
|
||||
|
||||
course_overview.force_on_flexible_peer_openassessments = course.force_on_flexible_peer_openassessments
|
||||
|
||||
if not CatalogIntegration.is_enabled():
|
||||
course_overview.language = course.language
|
||||
|
||||
|
||||
@@ -978,6 +978,13 @@ class CourseFields: # lint-amnesty, pylint: disable=missing-class-docstring
|
||||
]
|
||||
)
|
||||
|
||||
force_on_flexible_peer_openassessments = Boolean(
|
||||
display_name=_("Force Flexible Grading for Peer ORAs"),
|
||||
help=_("Setting this flag will force on the flexible grading option for all peer-graded ORAs in this course."),
|
||||
scope=Scope.settings,
|
||||
default=False,
|
||||
)
|
||||
|
||||
"""
|
||||
instructor_info dict structure:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user