-
Notifications
You must be signed in to change notification settings - Fork 0
PAE-845 Enhance prerequisites to allow more flexible configuration #59
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
base: pearson-release/juniper.stage
Are you sure you want to change the base?
Changes from 11 commits
afaef49
7fbd18d
7f5577a
fd1cb3d
06d1b0f
4c780d4
35df324
5eb6ccb
1ac789f
c3a4646
54599d5
878a61a
f8f73be
d92af02
abacb35
8abfea8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,7 +125,7 @@ | |
| from track import segment | ||
| from util.cache import cache, cache_if_anonymous | ||
| from util.db import outer_atomic | ||
| from util.milestones_helpers import get_prerequisite_courses_display | ||
| from util.milestones_helpers import get_prerequisite_courses_display, get_pre_requisite_courses_not_completed | ||
| from util.views import ensure_valid_course_key, ensure_valid_usage_key | ||
| from xmodule.course_module import COURSE_VISIBILITY_PUBLIC, COURSE_VISIBILITY_PUBLIC_OUTLINE | ||
| from xmodule.modulestore.django import modulestore | ||
|
|
@@ -956,6 +956,17 @@ def course_about(request, course_id): | |
| # get prerequisite courses display names | ||
| pre_requisite_courses = get_prerequisite_courses_display(course) | ||
|
|
||
| courses_requirements_not_met = get_pre_requisite_courses_not_completed(request.user, frozenset({course.id})) | ||
| skus_not_enrollment_in_requirements = run_extension_point( | ||
| 'PEARSON_CORE_STUDENT_NOT_ENROLLED_IN_REQUIREMENTS', | ||
| user=request.user, | ||
| courses_requirements_not_met=courses_requirements_not_met, | ||
| ) | ||
| course_requirements = run_extension_point( | ||
| 'PEARSON_CORE_STUDENT_COURSE_REQUIREMENTS_FOR_COURSEWARE', | ||
| courses_requirements_not_met=courses_requirements_not_met, | ||
| ) | ||
|
|
||
| # Overview | ||
| overview = CourseOverview.get_from_id(course.id) | ||
|
|
||
|
|
@@ -994,6 +1005,10 @@ def course_about(request, course_id): | |
| # context. This value is therefor explicitly set to render the appropriate header. | ||
| 'disable_courseware_header': True, | ||
| 'pre_requisite_courses': pre_requisite_courses, | ||
| 'course_requirements': course_requirements if course_requirements else None, | ||
Jacatove marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 'student_not_enrollment_in_requirement': \ | ||
| skus_not_enrollment_in_requirements[course.id] if skus_not_enrollment_in_requirements else None, | ||
| "ecommerce_payment_page": EcommerceService().payment_page_url(), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need this? @anfbermudezme
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| 'course_image_urls': overview.image_urls, | ||
| 'reviews_fragment_view': reviews_fragment_view, | ||
| 'sidebar_html_enabled': sidebar_html_enabled, | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary change. @anfbermudezme