-
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 15 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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -45,6 +45,7 @@ | |||||
| from openedx.core.djangoapps.waffle_utils import WaffleFlag, WaffleFlagNamespace | ||||||
| from openedx.core.djangolib.markup import HTML, Text | ||||||
| from openedx.features.enterprise_support.api import get_dashboard_consent_notification | ||||||
| from openedx.core.djangoapps.plugins.plugins_hooks import run_extension_point | ||||||
| from shoppingcart.models import CourseRegistrationCode, DonationConfiguration | ||||||
| from student.api import COURSE_DASHBOARD_PLUGIN_VIEW_NAME | ||||||
| from student.helpers import cert_info, check_verify_status_by_course, get_resume_urls_for_enrollments | ||||||
|
|
@@ -802,8 +803,22 @@ def student_dashboard(request): | |||||
| enrollment.course_id for enrollment in course_enrollments | ||||||
| if enrollment.course_overview.pre_requisite_courses | ||||||
| ) | ||||||
|
|
||||||
|
||||||
| courses_requirements_not_met = get_pre_requisite_courses_not_completed(user, courses_having_prerequisites) | ||||||
|
|
||||||
| # sort requirements for each course in course_requirements_not_met. | ||||||
|
||||||
| # sort requirements for each course in course_requirements_not_met. | |
| # Sort requirements for each course in course_requirements_not_met. |
Outdated
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.
| # get the sku value for the requirements of each course in courses_requirements_not_met. | |
| # Get the SKU value for the requirements of each course in courses_requirements_not_met. |
| 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,20 @@ 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})) | ||||||
| # sort requirements for each course in course_requirements_not_met. | ||||||
|
||||||
| # sort requirements for each course in course_requirements_not_met. | |
| # Sort requirements for each course in course_requirements_not_met. |
Outdated
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.
I don't think this explains what you are doing here. @anfbermudezme
Jacatove marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
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.
course_requirements_for_courseware_views returns {} in case things don't go as expected, so you don't need to return None. @anfbermudezme
Outdated
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.
sku_not_enrollment_in_requirements returns {} in case things don't go as expected, so you don't need to return None. @anfbermudezme
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.
Why do you need this? @anfbermudezme
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.

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.