Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PADV 935 - CCX - replace link to old gradebook with link to new gradebook #114

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading