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
aa34c9d3
Commit
aa34c9d3
authored
Feb 25, 2013
by
Vasyl Nakvasiuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove 'passed' feature
parent
a70cb2e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
35 deletions
+20
-35
common/lib/xmodule/xmodule/conditional_module.py
+3
-4
common/lib/xmodule/xmodule/js/src/conditional/display.coffee
+16
-30
common/lib/xmodule/xmodule/js/src/poll/poll_main.js
+1
-1
No files found.
common/lib/xmodule/xmodule/conditional_module.py
View file @
aa34c9d3
...
...
@@ -115,8 +115,7 @@ class ConditionalModule(XModule):
'message'
:
message
}
html
=
self
.
system
.
render_template
(
'conditional_module.html'
,
context
)
return
json
.
dumps
({
'html'
:
[
html
],
'passed'
:
False
,
'message'
:
bool
(
message
)})
return
json
.
dumps
({
'html'
:
[
html
],
'message'
:
bool
(
message
)})
if
self
.
contents
is
None
:
self
.
contents
=
[
self
.
system
.
get_module
(
child_descriptor
)
.
get_html
()
...
...
@@ -124,7 +123,7 @@ class ConditionalModule(XModule):
html
=
self
.
contents
return
json
.
dumps
({
'html'
:
html
,
'passed'
:
True
})
return
json
.
dumps
({
'html'
:
html
})
def
get_icon_class
(
self
):
new_class
=
'other'
...
...
@@ -165,7 +164,7 @@ class ConditionalDescriptor(SequenceDescriptor):
if
sources
:
locations
=
[
location
.
strip
()
for
location
in
sources
.
split
(
';'
)]
for
location
in
locations
:
if
Location
.
is_valid
(
location
):
# Check valid location url.
if
Location
.
is_valid
(
location
):
# Check valid location url.
try
:
if
return_descriptor
:
descriptor
=
system
.
load_item
(
location
)
...
...
common/lib/xmodule/xmodule/js/src/conditional/display.coffee
View file @
aa34c9d3
class
@
Conditional
constructor
:
(
element
,
callerElId
,
reset
)
->
constructor
:
(
element
,
callerElId
)
->
@
el
=
$
(
element
).
find
(
'.conditional-wrapper'
)
@
callerElId
=
callerElId
if
reset
is
true
@
el
.
data
(
'passed'
,
null
)
@
passed
=
null
else
if
@
el
.
data
(
'passed'
)
is
true
return
else
if
@
el
.
data
(
'passed'
)
is
false
@
passed
=
false
else
@
passed
=
null
if
callerElId
isnt
undefined
and
@
passed
isnt
null
if
callerElId
isnt
undefined
dependencies
=
@
el
.
data
(
'depends'
)
if
(
typeof
dependencies
is
'string'
)
and
(
dependencies
.
length
>
0
)
and
(
dependencies
.
indexOf
(
callerElId
)
is
-
1
)
return
...
...
@@ -26,24 +15,21 @@ class @Conditional
render
:
(
element
)
->
$
.
postWithPrefix
"
#{
@
url
}
/conditional_get"
,
(
response
)
=>
if
(((
response
.
passed
is
true
)
&&
(
@
passed
is
false
))
||
(
@
passed
is
null
))
@
el
.
data
'passed'
,
response
.
passed
@
el
.
html
''
@
el
.
append
(
i
)
for
i
in
response
.
html
@
el
.
html
''
@
el
.
append
(
i
)
for
i
in
response
.
html
parentEl
=
$
(
element
).
parent
()
parentId
=
parentEl
.
attr
'id'
parentEl
=
$
(
element
).
parent
()
parentId
=
parentEl
.
attr
'id'
if
response
.
message
is
fa
lse
if
parentId
.
indexOf
(
'vert'
)
is
0
parentEl
.
hide
()
else
$
(
element
).
hide
()
if
response
.
message
is
false
if
parentId
.
indexOf
(
'vert'
)
is
0
parentEl
.
hide
()
e
lse
$
(
element
).
hide
()
else
if
parentId
.
indexOf
(
'vert'
)
is
0
parentEl
.
show
()
else
if
parentId
.
indexOf
(
'vert'
)
is
0
parentEl
.
show
()
else
$
(
element
).
show
()
$
(
element
).
show
()
XModule
.
loadModules
@
el
XModule
.
loadModules
@
el
common/lib/xmodule/xmodule/js/src/poll/poll_main.js
View file @
aa34c9d3
...
...
@@ -104,7 +104,7 @@ PollMain.prototype = {
// notifying the constructor that this is a reset operation.
if
(
_this
.
wrapperSectionEl
!==
null
)
{
$
(
_this
.
wrapperSectionEl
).
find
(
'.xmodule_ConditionalModule'
).
each
(
function
(
index
,
value
)
{
new
window
.
Conditional
(
value
,
_this
.
id
.
replace
(
/^poll_/
,
''
)
,
true
);
new
window
.
Conditional
(
value
,
_this
.
id
.
replace
(
/^poll_/
,
''
));
});
}
}
...
...
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