Allow authors to remove option for unproctored exams
TNL-5084
This commit is contained in:
@@ -740,6 +740,17 @@ class CourseFields(object):
|
||||
scope=Scope.settings
|
||||
)
|
||||
|
||||
allow_proctoring_opt_out = Boolean(
|
||||
display_name=_("Allow Opting Out of Proctored Exams"),
|
||||
help=_(
|
||||
"Enter true or false. If this value is true, learners can choose to take proctored exams "
|
||||
"without proctoring. If this value is false, all learners must take the exam with proctoring. "
|
||||
"This setting only applies if proctored exams are enabled for the course."
|
||||
),
|
||||
default=True,
|
||||
scope=Scope.settings
|
||||
)
|
||||
|
||||
create_zendesk_tickets = Boolean(
|
||||
display_name=_("Create Zendesk Tickets For Suspicious Proctored Exam Attempts"),
|
||||
help=_(
|
||||
@@ -752,7 +763,8 @@ class CourseFields(object):
|
||||
enable_timed_exams = Boolean(
|
||||
display_name=_("Enable Timed Exams"),
|
||||
help=_(
|
||||
"Enter true or false. If this value is true, timed exams are enabled in your course."
|
||||
"Enter true or false. If this value is true, timed exams are enabled in your course. "
|
||||
"Regardless of this setting, timed exams are enabled if Enable Proctored Exams is set to true."
|
||||
),
|
||||
default=False,
|
||||
scope=Scope.settings
|
||||
|
||||
@@ -117,6 +117,12 @@ class ProctoringFields(object):
|
||||
scope=Scope.settings,
|
||||
)
|
||||
|
||||
def _get_course(self):
|
||||
"""
|
||||
Return course by course id.
|
||||
"""
|
||||
return self.descriptor.runtime.modulestore.get_course(self.course_id) # pylint: disable=no-member
|
||||
|
||||
@property
|
||||
def is_timed_exam(self):
|
||||
"""
|
||||
@@ -130,6 +136,14 @@ class ProctoringFields(object):
|
||||
""" Alias the is_proctored_enabled field to the more legible is_proctored_exam """
|
||||
return self.is_proctored_enabled
|
||||
|
||||
@property
|
||||
def allow_proctoring_opt_out(self):
|
||||
"""
|
||||
Returns true if the learner should be given the option to choose between
|
||||
taking a proctored exam, or opting out to take the exam without proctoring.
|
||||
"""
|
||||
return self._get_course().allow_proctoring_opt_out
|
||||
|
||||
@is_proctored_exam.setter
|
||||
def is_proctored_exam(self, value):
|
||||
""" Alias the is_proctored_enabled field to the more legible is_proctored_exam """
|
||||
@@ -453,6 +467,7 @@ class SequenceModule(SequenceFields, ProctoringFields, XModule):
|
||||
self.default_time_limit_minutes else 0
|
||||
),
|
||||
'is_practice_exam': self.is_practice_exam,
|
||||
'allow_proctoring_opt_out': self.allow_proctoring_opt_out,
|
||||
'due_date': self.due
|
||||
}
|
||||
|
||||
|
||||
@@ -220,6 +220,7 @@ class AdvancedSettingsPage(CoursePage):
|
||||
'video_bumper',
|
||||
'cert_html_view_enabled',
|
||||
'enable_proctored_exams',
|
||||
'allow_proctoring_opt_out',
|
||||
'enable_timed_exams',
|
||||
'enable_subsection_gating',
|
||||
'learning_info',
|
||||
|
||||
Reference in New Issue
Block a user