Skip to content

Commit

Permalink
Merge pull request #114 from Pearson-Advance/vue/PADV-935
Browse files Browse the repository at this point in the history
PADV 935 - CCX - replace link to old gradebook with link to new gradebook
  • Loading branch information
alexjmpb authored Jan 23, 2024
2 parents 2be76ad + 452fb93 commit 7d184a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lms/djangoapps/ccx/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
parse_date,
)
from lms.djangoapps.courseware.field_overrides import disable_overrides
from lms.djangoapps.grades.api import CourseGradeFactory
from lms.djangoapps.grades.api import CourseGradeFactory, is_writable_gradebook_enabled
from lms.djangoapps.instructor.enrollment import enroll_email, get_email_params
from lms.djangoapps.instructor.views.gradebook_api import get_grade_book_page
from openedx.core.djangoapps.django_comment_common.models import FORUM_ROLE_ADMINISTRATOR, assign_role
Expand Down Expand Up @@ -194,6 +194,12 @@ def dashboard(request, course, ccx=None):
) if is_course_licensing_enabled else []
context['gradebook_url'] = reverse(
'ccx_gradebook', kwargs={'course_id': ccx_locator})
writable_gradebook_url = configuration_helpers.get_value(
'WRITABLE_GRADEBOOK_URL',
getattr(settings, 'WRITABLE_GRADEBOOK_URL', None),
)
if is_writable_gradebook_enabled(ccx_locator) and writable_gradebook_url:
context['gradebook_url'] = f'{writable_gradebook_url}/{str(ccx_locator)}'
context['grades_csv_url'] = reverse(
'ccx_grades_csv', kwargs={'course_id': ccx_locator})
context['grading_policy'] = json.dumps(grading_policy, indent=4)
Expand Down

0 comments on commit 7d184a0

Please sign in to comment.