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
e5e917c2
Commit
e5e917c2
authored
Jun 29, 2017
by
Douglas Cerna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addressed Braden's observations
parent
d9b24f43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
22 deletions
+12
-22
problem_builder/mcq.py
+12
-15
problem_builder/mentoring.py
+0
-7
No files found.
problem_builder/mcq.py
View file @
e5e917c2
...
...
@@ -173,7 +173,7 @@ class MCQBlock(SubmittingXBlockMixin, QuestionnaireAbstractBlock):
retrievable from the Course Block API.
"""
return
{
'id'
:
self
.
url_
name
,
'id'
:
self
.
name
,
'type'
:
self
.
CATEGORY
,
'question'
:
self
.
question
,
'message'
:
self
.
message
,
...
...
@@ -187,22 +187,8 @@ class MCQBlock(SubmittingXBlockMixin, QuestionnaireAbstractBlock):
{
'content'
:
tip
.
content
,
'for_choices'
:
tip
.
values
}
for
tip
in
self
.
get_tips
()
],
'user_state'
:
{
'student_choice'
:
self
.
student_choice
,
},
}
@property
def
url_name
(
self
):
"""
Get the url_name for this block. In Studio/LMS it is provided by a mixin, so we just
defer to super(). In the workbench or any other platform, we use the name.
"""
try
:
return
super
(
MCQBlock
,
self
)
.
url_name
except
AttributeError
:
return
self
.
name
class
RatingBlock
(
MCQBlock
):
"""
...
...
@@ -260,6 +246,17 @@ class RatingBlock(MCQBlock):
self
.
render_children
(
context
,
fragment
,
can_reorder
=
True
,
can_add
=
False
)
return
fragment
@property
def
url_name
(
self
):
"""
Get the url_name for this block. In Studio/LMS it is provided by a mixin, so we just
defer to super(). In the workbench or any other platform, we use the name.
"""
try
:
return
super
(
RatingBlock
,
self
)
.
url_name
except
AttributeError
:
return
self
.
name
def
student_view
(
self
,
context
):
fragment
=
super
(
RatingBlock
,
self
)
.
student_view
(
context
)
rendering_for_studio
=
None
...
...
problem_builder/mentoring.py
View file @
e5e917c2
...
...
@@ -917,13 +917,6 @@ class MentoringBlock(BaseMentoringBlock, StudioContainerWithNestedXBlocksMixin,
components
.
append
(
block
.
student_view_data
())
return
{
'max_attempts'
:
self
.
max_attempts
,
'user_state'
:
{
'num_attempts'
:
self
.
num_attempts
,
'attempted'
:
self
.
attempted
,
'completed'
:
self
.
completed
,
'student_results'
:
self
.
student_results
,
'step'
:
self
.
step
,
},
'extended_feedback'
:
self
.
extended_feedback
,
'feedback_label'
:
self
.
feedback_label
,
'components'
:
components
,
...
...
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