-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a feature flag for the sync grade side of auto grading
This will allow us to expose the configuring and calculating side of auto grading while we work on the syncing part.
- Loading branch information
Showing
5 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -713,7 +713,18 @@ def LTIEvent(self, patch): | |
|
||
|
||
class TestEnableDashboardMode: | ||
def test_it(self, js_config, lti_user, bearer_token_schema): | ||
@pytest.mark.parametrize("auto_grading_sync_setting", [True, False]) | ||
def test_it( | ||
self, | ||
js_config, | ||
lti_user, | ||
bearer_token_schema, | ||
auto_grading_sync_setting, | ||
application_instance, | ||
): | ||
application_instance.settings.set( | ||
"hypothesis", "auto_grading_sync_enabled", auto_grading_sync_setting | ||
) | ||
js_config.enable_dashboard_mode(token_lifetime_seconds=100) | ||
config = js_config.asdict() | ||
|
||
|
@@ -737,6 +748,7 @@ def test_it(self, js_config, lti_user, bearer_token_schema): | |
"students": "/api/dashboard/students", | ||
"assignment_grades_sync": "/api/dashboard/assignments/:assignment_id/grading/sync", | ||
}, | ||
"auto_grading_sync_enabled": auto_grading_sync_setting, | ||
} | ||
|
||
def test_user_when_staff(self, js_config, pyramid_request_staff_member, context): | ||
|
@@ -748,6 +760,8 @@ def test_user_when_staff(self, js_config, pyramid_request_staff_member, context) | |
"is_staff": True, | ||
"display_name": "[email protected]", | ||
} | ||
# Grade syncing always disabled for staff | ||
assert not config["dashboard"]["auto_grading_sync_enabled"] | ||
|
||
@pytest.fixture | ||
def pyramid_request_staff_member(self, pyramid_config, pyramid_request): | ||
|