Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
1ae6aab7
Commit
1ae6aab7
authored
Mar 19, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3 from aboudreault/mrq-mistake-mark
Mrq mistake mark
parents
6d576e07
2e212b5c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
19 additions
and
22 deletions
+19
-22
mentoring/mentoring.py
+1
-5
mentoring/public/css/mentoring.css
+1
-1
mentoring/public/css/questionnaire.css
+10
-7
mentoring/public/img/correct-icon.png
+0
-0
mentoring/public/img/incorrect-icon.png
+0
-0
mentoring/public/js/questionnaire.js
+2
-2
mentoring/questionnaire.py
+0
-4
mentoring/templates/html/mentoring.html
+3
-1
mentoring/templates/html/mentoring_progress.html
+1
-1
mentoring/templates/html/mrqblock_choices.html
+1
-1
No files found.
mentoring/mentoring.py
View file @
1ae6aab7
...
@@ -74,8 +74,6 @@ class MentoringBlock(XBlockWithLightChildren):
...
@@ -74,8 +74,6 @@ class MentoringBlock(XBlockWithLightChildren):
fragment
,
named_children
=
self
.
get_children_fragment
(
context
,
view_name
=
'mentoring_view'
,
fragment
,
named_children
=
self
.
get_children_fragment
(
context
,
view_name
=
'mentoring_view'
,
not_instance_of
=
MentoringMessageBlock
)
not_instance_of
=
MentoringMessageBlock
)
correct_icon_url
=
self
.
runtime
.
local_resource_url
(
self
,
'public/img/correct-icon.png'
)
fragment
.
add_content
(
render_template
(
'templates/html/mentoring.html'
,
{
fragment
.
add_content
(
render_template
(
'templates/html/mentoring.html'
,
{
'self'
:
self
,
'self'
:
self
,
'named_children'
:
named_children
,
'named_children'
:
named_children
,
...
@@ -85,9 +83,7 @@ class MentoringBlock(XBlockWithLightChildren):
...
@@ -85,9 +83,7 @@ class MentoringBlock(XBlockWithLightChildren):
fragment
.
add_javascript_url
(
fragment
.
add_javascript_url
(
self
.
runtime
.
local_resource_url
(
self
,
'public/js/vendor/underscore-min.js'
))
self
.
runtime
.
local_resource_url
(
self
,
'public/js/vendor/underscore-min.js'
))
fragment
.
add_javascript_url
(
self
.
runtime
.
local_resource_url
(
self
,
'public/js/mentoring.js'
))
fragment
.
add_javascript_url
(
self
.
runtime
.
local_resource_url
(
self
,
'public/js/mentoring.js'
))
fragment
.
add_resource
(
load_resource
(
'templates/html/mentoring_progress.html'
)
.
format
(
fragment
.
add_resource
(
load_resource
(
'templates/html/mentoring_progress.html'
),
"text/html"
)
completed
=
correct_icon_url
),
"text/html"
)
fragment
.
initialize_js
(
'MentoringBlock'
)
fragment
.
initialize_js
(
'MentoringBlock'
)
...
...
mentoring/public/css/mentoring.css
View file @
1ae6aab7
...
@@ -50,5 +50,5 @@
...
@@ -50,5 +50,5 @@
}
}
.mentoring
.progress
.indicator
.checkmark
{
.mentoring
.progress
.indicator
.checkmark
{
margin-top
:
25px
;
color
:
#006600
;
}
}
mentoring/public/css/questionnaire.css
View file @
1ae6aab7
...
@@ -12,18 +12,21 @@
...
@@ -12,18 +12,21 @@
}
}
.mentoring
.choices
.choice-result
{
.mentoring
.choices
.choice-result
{
padding-right
:
40px
;
padding-right
:
10px
;
background-position
:
center
;
vertical-align
:
middle
;
background-repeat
:
no-repeat
;
}
}
.mentoring
.choices
.choice-result.correct
{
.mentoring
.choices
.choice-result.correct
{
background-image
:
url({{ correct_icon_url }})
;
color
:
#006600
;
cursor
:
pointer
;
position
:
relative
;
top
:
-3px
;
}
}
.mentoring
.choices
.choice-result.incorrect
{
.mentoring
.choices
.choice-result.incorrect
{
background-image
:
url({{ incorrect_icon_url }})
;
margin-right
:
10px
;
cursor
:
pointer
;
padding-left
:
10px
;
padding-right
:
10px
;
color
:
#ff0000
;
}
}
.mentoring
.choices
.choice-tips
,
.mentoring
.choices
.choice-tips
,
...
...
mentoring/public/img/correct-icon.png
deleted
100644 → 0
View file @
6d576e07
224 Bytes
mentoring/public/img/incorrect-icon.png
deleted
100644 → 0
View file @
6d576e07
257 Bytes
mentoring/public/js/questionnaire.js
View file @
1ae6aab7
...
@@ -66,9 +66,9 @@ function MRQBlock(runtime, element) {
...
@@ -66,9 +66,9 @@ function MRQBlock(runtime, element) {
choiceTipsCloseDOM
;
choiceTipsCloseDOM
;
if
(
choice
.
completed
)
{
if
(
choice
.
completed
)
{
choiceResultDOM
.
removeClass
(
'incorrect
'
).
addClass
(
'correct
'
);
choiceResultDOM
.
removeClass
(
'incorrect
icon-exclamation'
).
addClass
(
'correct icon-ok
'
);
}
else
{
}
else
{
choiceResultDOM
.
removeClass
(
'correct
'
).
addClass
(
'incorrect
'
);
choiceResultDOM
.
removeClass
(
'correct
icon-ok'
).
addClass
(
'incorrect icon-exclamation
'
);
}
}
choiceTipsDOM
.
html
(
choice
.
tips
);
choiceTipsDOM
.
html
(
choice
.
tips
);
...
...
mentoring/questionnaire.py
View file @
1ae6aab7
...
@@ -85,10 +85,6 @@ class QuestionnaireAbstractBlock(LightChild):
...
@@ -85,10 +85,6 @@ class QuestionnaireAbstractBlock(LightChild):
fragment
=
Fragment
(
html
)
fragment
=
Fragment
(
html
)
fragment
.
add_css
(
render_template
(
'public/css/questionnaire.css'
,
{
fragment
.
add_css
(
render_template
(
'public/css/questionnaire.css'
,
{
'self'
:
self
,
'self'
:
self
,
'correct_icon_url'
:
self
.
runtime
.
local_resource_url
(
self
.
xblock_container
,
'public/img/correct-icon.png'
),
'incorrect_icon_url'
:
self
.
runtime
.
local_resource_url
(
self
.
xblock_container
,
'public/img/incorrect-icon.png'
),
'close_icon_url'
:
self
.
runtime
.
local_resource_url
(
self
.
xblock_container
,
'close_icon_url'
:
self
.
runtime
.
local_resource_url
(
self
.
xblock_container
,
'public/img/close.png'
),
'public/img/close.png'
),
}))
}))
...
...
mentoring/templates/html/mentoring.html
View file @
1ae6aab7
...
@@ -7,10 +7,12 @@
...
@@ -7,10 +7,12 @@
{{c.body_html|safe}}
{{c.body_html|safe}}
{% endfor %}
{% endfor %}
{% if self.display_submit %}
{% if self.display_submit %}
<input
type=
"button"
value=
"Submit"
class=
"submit"
></input>
<div
class=
"submit"
>
<input
type=
"button"
value=
"Submit"
></input>
<span
class=
"progress"
data-completed=
"{{ self.completed }}"
>
<span
class=
"progress"
data-completed=
"{{ self.completed }}"
>
<span
class=
'indicator'
></span>
<span
class=
'indicator'
></span>
</span>
</span>
</div>
{% endif %}
{% endif %}
<div
class=
"messages"
></div>
<div
class=
"messages"
></div>
</div>
</div>
mentoring/templates/html/mentoring_progress.html
View file @
1ae6aab7
<script
type=
"text/template"
id=
"xblock-progress-template"
>
<script
type=
"text/template"
id=
"xblock-progress-template"
>
<%
if
(
completed
===
"True"
)
{{
%>
<%
if
(
completed
===
"True"
)
{{
%>
<
img
src
=
"{completed}"
class
=
"checkmark"
alt
=
"Completed"
>
<
i
class
=
"icon-ok icon-2x checkmark"
><
/i
>
<%
}}
%>
<%
}}
%>
</script>
</script>
mentoring/templates/html/mrqblock_choices.html
View file @
1ae6aab7
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"choices-list"
>
<div
class=
"choices-list"
>
{% for choice in custom_choices %}
{% for choice in custom_choices %}
<div
class=
"choice"
>
<div
class=
"choice"
>
<span
class=
"choice-result"
></span>
<span
class=
"choice-result
icon-2x
"
></span>
<label
class=
"choice-label"
>
<label
class=
"choice-label"
>
<input
class=
"choice-selector"
type=
"checkbox"
name=
"{{ self.name }}"
value=
"{{ choice.value }}"
{%
if
choice
.
value
in
self
.
student_choices
%}
checked
{%
endif
%}
>
{{ choice.content }}
<input
class=
"choice-selector"
type=
"checkbox"
name=
"{{ self.name }}"
value=
"{{ choice.value }}"
{%
if
choice
.
value
in
self
.
student_choices
%}
checked
{%
endif
%}
>
{{ choice.content }}
</label>
</label>
...
...
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