Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
1b9caa8a
Commit
1b9caa8a
authored
Dec 20, 2017
by
Bessie Steinberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve readability again
parent
c34a0aac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
common/djangoapps/util/milestones_helpers.py
+1
-1
common/test/acceptance/pages/lms/course_home.py
+1
-1
openedx/features/course_experience/views/course_outline.py
+11
-10
No files found.
common/djangoapps/util/milestones_helpers.py
View file @
1b9caa8a
...
...
@@ -350,7 +350,7 @@ def get_course_content_milestones(course_id, content_id=None, relationship='requ
Uses the request cache to store all of a user's
milestones
Returns all content blocks in a course if content_id is None, otherwise it just returns that
Returns all content blocks in a course if content_id is None, otherwise it just returns that
specific content block.
"""
if
not
settings
.
FEATURES
.
get
(
'MILESTONES_APP'
):
...
...
common/test/acceptance/pages/lms/course_home.py
View file @
1b9caa8a
...
...
@@ -4,6 +4,7 @@ LMS Course Home page object
from
collections
import
OrderedDict
import
logging
from
bok_choy.page_object
import
PageObject
from
.bookmarks
import
BookmarksPage
...
...
@@ -11,7 +12,6 @@ from .course_page import CoursePage
from
.courseware
import
CoursewarePage
from
.staff_view
import
StaffPreviewPage
import
logging
log
=
logging
.
getLogger
(
__name__
)
class
CourseHomePage
(
CoursePage
):
...
...
openedx/features/course_experience/views/course_outline.py
View file @
1b9caa8a
...
...
@@ -46,18 +46,19 @@ class CourseOutlineFragmentView(EdxFragmentView):
"""
Returns dict of subsections with prerequisites and whether the prerequisite has been completed or not
"""
course_content_milestones
=
{}
all_course_prereqs
=
get_course_content_milestones
(
course_
id
=
course_
key
)
all_course_prereqs
=
get_course_content_milestones
(
course_key
)
for
milestone
in
all_course_prereqs
:
course_content_milestones
[
milestone
[
'content_id'
]]
=
{
'completed_prereqs'
:
True
}
unfulfilled_prereqs
=
get_course_content_milestones
(
course_id
=
course_key
,
user_id
=
request
.
user
.
id
)
content_ids_of_unfulfilled_prereqs
=
[
milestone
[
'content_id'
]
for
milestone
in
get_course_content_milestones
(
course_key
,
user_id
=
request
.
user
.
id
)
]
for
milestone
in
unfulfilled_prereqs
:
course_content_milestones
[
milestone
[
'content_id'
]][
'completed_prereqs'
]
=
False
course_content_milestones
=
{
milestone
[
'content_id'
]:
{
'completed_prereqs'
:
milestone
[
'content_id'
]
not
in
content_ids_of_unfulfilled_prereqs
}
for
milestone
in
all_course_prereqs
}
return
course_content_milestones
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment