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
c4c998b5
Commit
c4c998b5
authored
Mar 17, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2954 from cpennington/pure-xblocks-progress-page
Fix LMS-2349 (Progress page broken for pure xblocks)
parents
945d8e05
a5498bcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
10 deletions
+39
-10
common/lib/xmodule/xmodule/x_module.py
+10
-10
lms/djangoapps/courseware/tests/test_views.py
+29
-0
No files found.
common/lib/xmodule/xmodule/x_module.py
View file @
c4c998b5
...
...
@@ -301,6 +301,16 @@ class XModuleMixin(XBlockMixin):
"""
return
self
.
icon_class
def
has_dynamic_children
(
self
):
"""
Returns True if this descriptor has dynamic children for a given
student when the module is created.
Returns False if the children of this descriptor are the same
children that the module will return for any student.
"""
return
False
# Functions used in the LMS
def
get_score
(
self
):
...
...
@@ -657,16 +667,6 @@ class XModuleDescriptor(XModuleMixin, HTMLSnippet, ResourceTemplates, XBlock):
self
.
edited_by
=
self
.
edited_on
=
self
.
previous_version
=
self
.
update_version
=
self
.
definition_locator
=
None
self
.
xmodule_runtime
=
None
def
has_dynamic_children
(
self
):
"""
Returns True if this descriptor has dynamic children for a given
student when the module is created.
Returns False if the children of this descriptor are the same
children that the module will return for any student.
"""
return
False
@classmethod
def
_translate
(
cls
,
key
):
'VS[compat]'
...
...
lms/djangoapps/courseware/tests/test_views.py
View file @
c4c998b5
...
...
@@ -424,3 +424,32 @@ class StartDateTests(ModuleStoreTestCase):
text
=
self
.
get_about_text
(
'edX/toy/TT_2012_Fall'
)
# The start date is set in common/test/data/two_toys/policies/TT_2012_Fall/policy.json
self
.
assertIn
(
"2015-JULY-17"
,
text
)
@override_settings
(
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
)
class
ProgressPageTests
(
ModuleStoreTestCase
):
"""
Tests that verify that the progress page works correctly.
"""
def
setUp
(
self
):
self
.
request_factory
=
RequestFactory
()
self
.
user
=
UserFactory
.
create
()
self
.
request
=
self
.
request_factory
.
get
(
"foo"
)
self
.
request
.
user
=
self
.
user
MakoMiddleware
()
.
process_request
(
self
.
request
)
course
=
CourseFactory
(
start
=
datetime
(
2013
,
9
,
16
,
7
,
17
,
28
))
self
.
course
=
modulestore
()
.
get_instance
(
course
.
id
,
course
.
location
)
# pylint: disable=no-member
self
.
chapter
=
ItemFactory
(
category
=
'chapter'
,
parent_location
=
self
.
course
.
location
)
# pylint: disable=no-member
self
.
section
=
ItemFactory
(
category
=
'sequential'
,
parent_location
=
self
.
chapter
.
location
)
self
.
vertical
=
ItemFactory
(
category
=
'vertical'
,
parent_location
=
self
.
section
.
location
)
def
test_pure_ungraded_xblock
(
self
):
ItemFactory
(
category
=
'acid'
,
parent_location
=
self
.
vertical
.
location
)
resp
=
views
.
progress
(
self
.
request
,
self
.
course
.
id
)
self
.
assertEquals
(
resp
.
status_code
,
200
)
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