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
fbd1095a
Commit
fbd1095a
authored
Nov 26, 2013
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add "Unsure" option to rating, renammed as 'rating-unsure'
parent
ff6a1b2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
mentoring/quizz.py
+1
-1
templates/html/quizz_rating-unsure.html
+8
-5
No files found.
mentoring/quizz.py
View file @
fbd1095a
...
@@ -76,7 +76,7 @@ class QuizzBlock(XBlock):
...
@@ -76,7 +76,7 @@ class QuizzBlock(XBlock):
return
Fragment
(
u"<p>I can only appear inside mentoring blocks.</p>"
)
return
Fragment
(
u"<p>I can only appear inside mentoring blocks.</p>"
)
def
mentoring_view
(
self
,
context
=
None
):
def
mentoring_view
(
self
,
context
=
None
):
if
self
.
type
not
in
(
'yes-no-unsure'
,
'rating'
):
if
self
.
type
not
in
(
'yes-no-unsure'
,
'rating
-unsure
'
):
raise
ValueError
,
u'Invalid value for QuizzBlock.type: `{}`'
.
format
(
self
.
type
)
raise
ValueError
,
u'Invalid value for QuizzBlock.type: `{}`'
.
format
(
self
.
type
)
template_path
=
'templates/html/quizz_{}.html'
.
format
(
self
.
type
)
template_path
=
'templates/html/quizz_{}.html'
.
format
(
self
.
type
)
...
...
templates/html/quizz_rating.html
→
templates/html/quizz_rating
-unsure
.html
View file @
fbd1095a
...
@@ -3,20 +3,23 @@
...
@@ -3,20 +3,23 @@
<div
class=
"choices"
>
<div
class=
"choices"
>
<span
class=
"low"
>
{{ self.low }}
</span>
<span
class=
"low"
>
{{ self.low }}
</span>
<span
class=
"choice"
>
<span
class=
"choice"
>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"1"
{%
if
self
.
student_choice =
=
'
1
'
%}
checked
{%
endif
%}
></label>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"1"
{%
if
self
.
student_choice =
=
'
1
'
%}
checked
{%
endif
%}
>
1
</label>
</span>
</span>
<span
class=
"choice"
>
<span
class=
"choice"
>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"2"
{%
if
self
.
student_choice =
=
'
2
'
%}
checked
{%
endif
%}
></label>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"2"
{%
if
self
.
student_choice =
=
'
2
'
%}
checked
{%
endif
%}
>
2
</label>
</span>
</span>
<span
class=
"choice"
>
<span
class=
"choice"
>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"3"
{%
if
self
.
student_choice =
=
'
3
'
%}
checked
{%
endif
%}
></label>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"3"
{%
if
self
.
student_choice =
=
'
3
'
%}
checked
{%
endif
%}
>
3
</label>
</span>
</span>
<span
class=
"choice"
>
<span
class=
"choice"
>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"4"
{%
if
self
.
student_choice =
=
'
4
'
%}
checked
{%
endif
%}
></label>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"4"
{%
if
self
.
student_choice =
=
'
4
'
%}
checked
{%
endif
%}
>
4
</label>
</span>
</span>
<span
class=
"choice"
>
<span
class=
"choice"
>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"5"
{%
if
self
.
student_choice =
=
'
5
'
%}
checked
{%
endif
%}
></label>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"5"
{%
if
self
.
student_choice =
=
'
5
'
%}
checked
{%
endif
%}
>
5
</label>
</span>
</span>
<span
class=
"low"
>
{{ self.high }}
</span>
<span
class=
"low"
>
{{ self.high }}
</span>
<span
class=
"choice"
>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"unsure"
{%
if
self
.
student_choice =
=
'
unsure
'
%}
checked
{%
endif
%}
>
Unsure
</label>
</span>
</div>
</div>
</fieldset>
</fieldset>
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