diff --git a/lms/models/application_instance.py b/lms/models/application_instance.py index 25cdf6ad07..a1de0f882b 100644 --- a/lms/models/application_instance.py +++ b/lms/models/application_instance.py @@ -54,8 +54,8 @@ class ApplicationSettings(JSONSettings): name="Auto Assigned To Organisation", ), JSONSetting("hypothesis", "instructor_email_digests_enabled", asbool), - JSONSetting("hypothesis", "instructor_dashboard", asbool), JSONSetting("hypothesis", "lti_13_sourcedid_for_grading", asbool), + JSONSetting("hypothesis", "auto_grading_enabled", asbool), ) diff --git a/lms/resources/_js_config/__init__.py b/lms/resources/_js_config/__init__.py index bb981177cc..5c49b1963f 100644 --- a/lms/resources/_js_config/__init__.py +++ b/lms/resources/_js_config/__init__.py @@ -361,6 +361,9 @@ def enable_file_picker_mode( # noqa: PLR0913 "formAction": form_action, "formFields": form_fields, "promptForTitle": prompt_for_title, + "autoGradingEnabled": self._application_instance.settings.get( + "auto_grading_enabled", False + ), # The "content item selection" that we submit to Canvas's # content_item_return_url is actually an LTI launch URL with # the selected document URL or file_id as a query parameter. To diff --git a/lms/templates/admin/application_instance/show.html.jinja2 b/lms/templates/admin/application_instance/show.html.jinja2 index 3f55c20139..7820e10a78 100644 --- a/lms/templates/admin/application_instance/show.html.jinja2 +++ b/lms/templates/admin/application_instance/show.html.jinja2 @@ -114,6 +114,7 @@ General settings {{ settings_checkbox('Enable instructor email digests', 'hypothesis', 'instructor_email_digests_enabled') }} {{ settings_checkbox("Use alternative parameter for LTI1.3 grading", "hypothesis", "lti_13_sourcedid_for_grading", default=False) }} + {{ settings_checkbox("Enable auto-grading", "hypothesis", "auto_grading_enabled", default=False) }}
Canvas settings