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
bb6ee4ce
Commit
bb6ee4ce
authored
Dec 08, 2013
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'quizz-maybenot-understand' type
parent
077e0c5a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
mentoring/quizz.py
+3
-3
templates/html/quizz_rating-understand.html
+1
-1
templates/html/quizz_yes-maybenot-understand.html
+14
-0
No files found.
mentoring/quizz.py
View file @
bb6ee4ce
...
@@ -69,7 +69,7 @@ class QuizzBlock(XBlock):
...
@@ -69,7 +69,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-understand'
):
if
self
.
type
not
in
(
'yes-
maybenot-understand
'
,
'rating-understand'
):
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
)
...
@@ -152,8 +152,8 @@ class QuizzTipBlock(XBlock):
...
@@ -152,8 +152,8 @@ class QuizzTipBlock(XBlock):
log
.
debug
(
reject
)
log
.
debug
(
reject
)
if
reject
is
None
:
if
reject
is
None
:
quizz
=
self
.
runtime
.
get_block
(
self
.
parent
)
quizz
=
self
.
runtime
.
get_block
(
self
.
parent
)
if
quizz
.
type
==
'yes-
no-unsure
'
:
if
quizz
.
type
==
'yes-
maybenot-understand
'
:
return
[
'
no'
,
'unsure
'
]
return
[
'
maybenot'
,
'understand
'
]
elif
quizz
.
type
==
'rating-understand'
:
elif
quizz
.
type
==
'rating-understand'
:
return
[
'1'
,
'2'
,
'3'
,
'understand'
]
return
[
'1'
,
'2'
,
'3'
,
'understand'
]
else
:
else
:
...
...
templates/html/quizz_rating-understand.html
View file @
bb6ee4ce
<fieldset
class=
"rating-un
sure
"
>
<fieldset
class=
"rating-un
derstand
"
>
<legend>
{{ self.question }}
</legend>
<legend>
{{ self.question }}
</legend>
<div
class=
"choices"
>
<div
class=
"choices"
>
<span
class=
"low"
>
{{ self.low }}
</span>
<span
class=
"low"
>
{{ self.low }}
</span>
...
...
templates/html/quizz_yes-maybenot-understand.html
0 → 100644
View file @
bb6ee4ce
<fieldset
class=
"yes-maybenot-understand"
>
<legend>
{{ self.question }}
</legend>
<div
class=
"choices"
>
<span
class=
"choice"
>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"yes"
{%
if
self
.
student_choice =
=
'
yes
'
%}
checked
{%
endif
%}
>
Yes
</label>
</span>
<span
class=
"choice"
>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"maybenot"
{%
if
self
.
student_choice =
=
'
maybenot
'
%}
checked
{%
endif
%}
>
Maybe not
</label>
</span>
<span
class=
"choice"
>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"understand"
{%
if
self
.
student_choice =
=
'
understand
'
%}
checked
{%
endif
%}
>
I don't understand
</label>
</span>
</div>
</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