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
077e0c5a
Commit
077e0c5a
authored
Dec 08, 2013
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename "unsure" into "I don't understand" for quizz rating type
parent
34cc759c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
mentoring/answer.py
+2
-1
mentoring/quizz.py
+4
-3
templates/html/quizz_rating-understand.html
+1
-1
No files found.
mentoring/answer.py
View file @
077e0c5a
...
...
@@ -29,7 +29,8 @@ class AnswerBlock(XBlock):
"""
student_input
=
Any
(
help
=
"Last input submitted by the student"
,
default
=
""
,
scope
=
Scope
.
user_state
)
read_only
=
Boolean
(
help
=
"Display as a read-only field"
,
default
=
False
,
scope
=
Scope
.
content
)
default_from
=
String
(
help
=
"If specified, the name of the answer to get the default value from"
,
default
=
None
,
scope
=
Scope
.
content
)
default_from
=
String
(
help
=
"If specified, the name of the answer to get the default value from"
,
default
=
None
,
scope
=
Scope
.
content
)
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
AnswerBlock
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
...
...
mentoring/quizz.py
View file @
077e0c5a
...
...
@@ -69,7 +69,7 @@ class QuizzBlock(XBlock):
return
Fragment
(
u"<p>I can only appear inside mentoring blocks.</p>"
)
def
mentoring_view
(
self
,
context
=
None
):
if
self
.
type
not
in
(
'yes-no-unsure'
,
'rating-un
sure
'
):
if
self
.
type
not
in
(
'yes-no-unsure'
,
'rating-un
derstand
'
):
raise
ValueError
,
u'Invalid value for QuizzBlock.type: `{}`'
.
format
(
self
.
type
)
template_path
=
'templates/html/quizz_{}.html'
.
format
(
self
.
type
)
...
...
@@ -130,6 +130,7 @@ class QuizzTipBlock(XBlock):
content
=
String
(
help
=
"Text of the tip to provide if needed"
,
scope
=
Scope
.
content
,
default
=
""
)
display
=
String
(
help
=
"List of choices to display the tip for"
,
scope
=
Scope
.
content
,
default
=
None
)
reject
=
String
(
help
=
"List of choices to reject"
,
scope
=
Scope
.
content
,
default
=
None
)
has_children
=
True
def
render
(
self
,
submission
):
"""
...
...
@@ -153,8 +154,8 @@ class QuizzTipBlock(XBlock):
quizz
=
self
.
runtime
.
get_block
(
self
.
parent
)
if
quizz
.
type
==
'yes-no-unsure'
:
return
[
'no'
,
'unsure'
]
elif
quizz
.
type
==
'rating-un
sure
'
:
return
[
'1'
,
'2'
,
'3'
,
'un
sure
'
]
elif
quizz
.
type
==
'rating-un
derstand
'
:
return
[
'1'
,
'2'
,
'3'
,
'un
derstand
'
]
else
:
return
reject
...
...
templates/html/quizz_rating-un
sure
.html
→
templates/html/quizz_rating-un
derstand
.html
View file @
077e0c5a
...
...
@@ -19,7 +19,7 @@
</span>
<span
class=
"low"
>
{{ self.high }}
</span>
<span
class=
"choice"
>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"un
sure"
{%
if
self
.
student_choice =
=
'
unsure
'
%}
checked
{%
endif
%}
>
Unsure
</label>
<label><input
type=
"radio"
name=
"{{ self.name }}"
value=
"un
derstand"
{%
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