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
e6fdf5a9
Commit
e6fdf5a9
authored
Jan 05, 2015
by
E. Kolpakov
Committed by
Zia Fazal
Apr 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added reference to TNL ticket mentioned in TODO + improved formatting of XML templates in tests
parent
7cb4ba54
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
common/lib/xmodule/xmodule/library_content_module.py
+3
-1
common/test/acceptance/tests/lms/test_library.py
+10
-7
No files found.
common/lib/xmodule/xmodule/library_content_module.py
View file @
e6fdf5a9
...
@@ -356,7 +356,9 @@ class LibraryContentDescriptor(LibraryContentFields, MakoModuleDescriptor, XmlDe
...
@@ -356,7 +356,9 @@ class LibraryContentDescriptor(LibraryContentFields, MakoModuleDescriptor, XmlDe
StudioValidationMessage
(
StudioValidationMessage
(
StudioValidationMessage
.
WARNING
,
StudioValidationMessage
.
WARNING
,
_
(
u'This component is out of date. The library has new content.'
),
_
(
u'This component is out of date. The library has new content.'
),
action_class
=
'library-update-btn'
,
# TODO: change this to action_runtime_event='...' once the unit page supports that feature.
# TODO: change this to action_runtime_event='...' once the unit page supports that feature.
# See https://openedx.atlassian.net/browse/TNL-993
action_class
=
'library-update-btn'
,
action_label
=
_
(
u"↻ Update now"
)
action_label
=
_
(
u"↻ Update now"
)
)
)
)
)
...
...
common/test/acceptance/tests/lms/test_library.py
View file @
e6fdf5a9
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
End-to-end tests for LibraryContent block in LMS
End-to-end tests for LibraryContent block in LMS
"""
"""
import
ddt
import
ddt
import
textwrap
from
..helpers
import
UniqueCourseTest
from
..helpers
import
UniqueCourseTest
from
...pages.studio.auto_auth
import
AutoAuthPage
from
...pages.studio.auto_auth
import
AutoAuthPage
...
@@ -201,23 +202,25 @@ class StudioLibraryContainerCapaFilterTest(LibraryContentTestBase):
...
@@ -201,23 +202,25 @@ class StudioLibraryContainerCapaFilterTest(LibraryContentTestBase):
for
item
,
correct
in
items
for
item
,
correct
in
items
])
])
return
"""<problem>
return
textwrap
.
dedent
(
"""
<problem>
<p>{name}</p>
<p>{name}</p>
<multiplechoiceresponse>
<multiplechoiceresponse>
<choicegroup label="{name}" type="MultipleChoice">{items}</choicegroup>
<choicegroup label="{name}" type="MultipleChoice">{items}</choicegroup>
</multiplechoiceresponse>
</multiplechoiceresponse>
</problem>"""
.
format
(
name
=
name
,
items
=
items_text
)
</problem>"""
)
.
format
(
name
=
name
,
items
=
items_text
)
def
_get_problem_select_text
(
self
,
name
,
items
,
correct
):
def
_get_problem_select_text
(
self
,
name
,
items
,
correct
):
""" Generates Select Option CAPA problem XML """
""" Generates Select Option CAPA problem XML """
items_text
=
","
.
join
([
"'{0}'"
.
format
(
item
)
for
item
in
items
])
items_text
=
","
.
join
([
"'{0}'"
.
format
(
item
)
for
item
in
items
])
return
"""<problem>
return
textwrap
.
dedent
(
"""
<p>{name}</p>
<problem>
<optionresponse>
<p>{name}</p>
<optionresponse>
<optioninput label="{name}" options="({options})" correct="{correct}"></optioninput>
<optioninput label="{name}" options="({options})" correct="{correct}"></optioninput>
</optionresponse>
</optionresponse>
</problem>"""
.
format
(
name
=
name
,
options
=
items_text
,
correct
=
correct
)
</problem>"""
)
.
format
(
name
=
name
,
options
=
items_text
,
correct
=
correct
)
def
populate_library_fixture
(
self
,
library_fixture
):
def
populate_library_fixture
(
self
,
library_fixture
):
"""
"""
...
...
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