Skip to content

Commit

Permalink
Expose grade syncing endpoint to the FE
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed Sep 19, 2024
1 parent d2bf556 commit 5ee0a24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lms/js_config_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ class DashboardRoutes(TypedDict):
students: str
"""Paginated endpoint to fetch students"""

assignment_grades_sync: str
"""Sync grades for a given assignment"""


class User(TypedDict):
is_staff: bool
Expand Down
3 changes: 3 additions & 0 deletions lms/resources/_js_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ def enable_dashboard_mode(self, token_lifetime_seconds: int) -> None:
"api.dashboard.assignments"
),
students=self._to_frontend_template("api.dashboard.students"),
assignment_grades_sync=self._to_frontend_template(
"api.dashboard.assignments.grading.sync"
),
),
),
}
Expand Down
1 change: 1 addition & 0 deletions tests/unit/lms/resources/_js_config/__init___test.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ def test_it(self, js_config, lti_user, bearer_token_schema):
"courses": "/api/dashboard/courses",
"assignments": "/api/dashboard/assignments",
"students": "/api/dashboard/students",
"assignment_grades_sync": "/api/dashboard/assignments/:assignment_id/grading/sync",
},
}

Expand Down

0 comments on commit 5ee0a24

Please sign in to comment.