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
b89f4d5a
Commit
b89f4d5a
authored
Feb 08, 2013
by
Alexander Kryklia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidden is default behaviour
parent
f01e618a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
common/lib/xmodule/xmodule/conditional_module.py
+2
-1
lms/templates/conditional_module.html
+6
-4
No files found.
common/lib/xmodule/xmodule/conditional_module.py
View file @
b89f4d5a
...
@@ -92,7 +92,8 @@ class ConditionalModule(XModule):
...
@@ -92,7 +92,8 @@ class ConditionalModule(XModule):
an AJAX call.
an AJAX call.
"""
"""
if
not
self
.
is_condition_satisfied
():
if
not
self
.
is_condition_satisfied
():
context
=
{
'module'
:
self
}
context
=
{
'module'
:
self
,
'show_deps'
:
False
}
html
=
self
.
system
.
render_template
(
'conditional_module.html'
,
html
=
self
.
system
.
render_template
(
'conditional_module.html'
,
context
)
context
)
return
json
.
dumps
({
'html'
:
[
html
]})
return
json
.
dumps
({
'html'
:
[
html
]})
...
...
lms/templates/conditional_module.html
View file @
b89f4d5a
...
@@ -6,7 +6,9 @@
...
@@ -6,7 +6,9 @@
return
module
.
location
.
org
+'/'
+
module
.
location
.
course
+'/'
+
module
.
system
.
ajax_url
.
split
('/')[
4
]
return
module
.
location
.
org
+'/'
+
module
.
location
.
course
+'/'
+
module
.
system
.
ajax_url
.
split
('/')[
4
]
%
>
%
>
% for reqm in module.required_modules:
% if show_deps
<p><a
href=
"${reverse('jump_to',kwargs=dict(course_id=get_course_id(reqm), location=reqm.location.url()))}"
>
${reqm.display_name}
</a>
% for reqm in module.required_modules:
must be completed before this will become visible.
</p>
<p><a
href=
"${reverse('jump_to',kwargs=dict(course_id=get_course_id(reqm), location=reqm.location.url()))}"
>
${reqm.display_name}
</a>
% endfor
must be completed before this will become visible.
</p>
% endfor
% endif
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