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
ef6d54ad
Commit
ef6d54ad
authored
Aug 04, 2017
by
E. Kolpakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added student_view_user_state to remaining blocks that have student data
parent
468a2c86
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
12 deletions
+21
-12
problem_builder/choice.py
+5
-2
problem_builder/completion.py
+3
-2
problem_builder/mcq.py
+2
-1
problem_builder/mentoring.py
+3
-2
problem_builder/mrq.py
+3
-1
problem_builder/slider.py
+3
-2
problem_builder/step.py
+2
-2
No files found.
problem_builder/choice.py
View file @
ef6d54ad
...
@@ -29,7 +29,7 @@ from xblock.fragment import Fragment
...
@@ -29,7 +29,7 @@ from xblock.fragment import Fragment
from
xblock.validation
import
ValidationMessage
from
xblock.validation
import
ValidationMessage
from
xblockutils.studio_editable
import
StudioEditableXBlockMixin
,
XBlockWithPreviewMixin
from
xblockutils.studio_editable
import
StudioEditableXBlockMixin
,
XBlockWithPreviewMixin
from
problem_builder.mixins
import
XBlockWithTranslationServiceMixin
from
problem_builder.mixins
import
XBlockWithTranslationServiceMixin
,
StudentViewUserStateMixin
# Make '_' a no-op so we can scrape strings
# Make '_' a no-op so we can scrape strings
...
@@ -40,7 +40,10 @@ def _(text):
...
@@ -40,7 +40,10 @@ def _(text):
@XBlock.needs
(
"i18n"
)
@XBlock.needs
(
"i18n"
)
class
ChoiceBlock
(
StudioEditableXBlockMixin
,
XBlockWithPreviewMixin
,
XBlockWithTranslationServiceMixin
,
XBlock
):
class
ChoiceBlock
(
StudioEditableXBlockMixin
,
XBlockWithPreviewMixin
,
XBlockWithTranslationServiceMixin
,
StudentViewUserStateMixin
,
XBlock
):
"""
"""
Custom choice of an answer for a MCQ/MRQ
Custom choice of an answer for a MCQ/MRQ
"""
"""
...
...
problem_builder/completion.py
View file @
ef6d54ad
...
@@ -28,7 +28,7 @@ from xblock.fragment import Fragment
...
@@ -28,7 +28,7 @@ from xblock.fragment import Fragment
from
xblockutils.studio_editable
import
StudioEditableXBlockMixin
from
xblockutils.studio_editable
import
StudioEditableXBlockMixin
from
xblockutils.resources
import
ResourceLoader
from
xblockutils.resources
import
ResourceLoader
from
.mixins
import
QuestionMixin
,
XBlockWithTranslationServiceMixin
from
.mixins
import
QuestionMixin
,
XBlockWithTranslationServiceMixin
,
StudentViewUserStateMixin
from
.sub_api
import
sub_api
,
SubmittingXBlockMixin
from
.sub_api
import
sub_api
,
SubmittingXBlockMixin
...
@@ -47,7 +47,8 @@ def _(text):
...
@@ -47,7 +47,8 @@ def _(text):
@XBlock.needs
(
'i18n'
)
@XBlock.needs
(
'i18n'
)
class
CompletionBlock
(
class
CompletionBlock
(
SubmittingXBlockMixin
,
QuestionMixin
,
StudioEditableXBlockMixin
,
XBlockWithTranslationServiceMixin
,
XBlock
SubmittingXBlockMixin
,
QuestionMixin
,
StudioEditableXBlockMixin
,
XBlockWithTranslationServiceMixin
,
StudentViewUserStateMixin
,
XBlock
):
):
"""
"""
An XBlock used by students to indicate that they completed a given task.
An XBlock used by students to indicate that they completed a given task.
...
...
problem_builder/mcq.py
View file @
ef6d54ad
...
@@ -27,6 +27,7 @@ from xblock.fragment import Fragment
...
@@ -27,6 +27,7 @@ from xblock.fragment import Fragment
from
xblock.validation
import
ValidationMessage
from
xblock.validation
import
ValidationMessage
from
xblockutils.resources
import
ResourceLoader
from
xblockutils.resources
import
ResourceLoader
from
problem_builder.mixins
import
StudentViewUserStateMixin
from
.questionnaire
import
QuestionnaireAbstractBlock
from
.questionnaire
import
QuestionnaireAbstractBlock
from
.sub_api
import
sub_api
,
SubmittingXBlockMixin
from
.sub_api
import
sub_api
,
SubmittingXBlockMixin
...
@@ -44,7 +45,7 @@ def _(text):
...
@@ -44,7 +45,7 @@ def _(text):
# Classes ###########################################################
# Classes ###########################################################
class
MCQBlock
(
SubmittingXBlockMixin
,
QuestionnaireAbstractBlock
):
class
MCQBlock
(
SubmittingXBlockMixin
,
StudentViewUserStateMixin
,
QuestionnaireAbstractBlock
):
"""
"""
An XBlock used to ask multiple-choice questions
An XBlock used to ask multiple-choice questions
"""
"""
...
...
problem_builder/mentoring.py
View file @
ef6d54ad
...
@@ -36,8 +36,8 @@ from xblock.validation import ValidationMessage
...
@@ -36,8 +36,8 @@ from xblock.validation import ValidationMessage
from
.message
import
MentoringMessageBlock
,
get_message_label
from
.message
import
MentoringMessageBlock
,
get_message_label
from
.mixins
import
(
from
.mixins
import
(
_normalize_id
,
QuestionMixin
,
MessageParentMixin
,
StepParentMixin
,
XBlockWithTranslationServiceMixin
_normalize_id
,
QuestionMixin
,
MessageParentMixin
,
StepParentMixin
,
XBlockWithTranslationServiceMixin
,
)
StudentViewUserStateMixin
)
from
.step_review
import
ReviewStepBlock
from
.step_review
import
ReviewStepBlock
from
xblockutils.helpers
import
child_isinstance
from
xblockutils.helpers
import
child_isinstance
...
@@ -91,6 +91,7 @@ PARTIAL = 'partial'
...
@@ -91,6 +91,7 @@ PARTIAL = 'partial'
class
BaseMentoringBlock
(
class
BaseMentoringBlock
(
XBlock
,
XBlockWithTranslationServiceMixin
,
XBlockWithSettingsMixin
,
XBlock
,
XBlockWithTranslationServiceMixin
,
XBlockWithSettingsMixin
,
StudioEditableXBlockMixin
,
ThemableXBlockMixin
,
MessageParentMixin
,
StudioEditableXBlockMixin
,
ThemableXBlockMixin
,
MessageParentMixin
,
StudentViewUserStateMixin
,
):
):
"""
"""
An XBlock that defines functionality shared by mentoring blocks.
An XBlock that defines functionality shared by mentoring blocks.
...
...
problem_builder/mrq.py
View file @
ef6d54ad
...
@@ -24,6 +24,8 @@ import logging
...
@@ -24,6 +24,8 @@ import logging
from
xblock.fields
import
List
,
Scope
,
Boolean
,
String
from
xblock.fields
import
List
,
Scope
,
Boolean
,
String
from
xblock.validation
import
ValidationMessage
from
xblock.validation
import
ValidationMessage
from
problem_builder.mixins
import
StudentViewUserStateMixin
from
.questionnaire
import
QuestionnaireAbstractBlock
from
.questionnaire
import
QuestionnaireAbstractBlock
from
xblockutils.resources
import
ResourceLoader
from
xblockutils.resources
import
ResourceLoader
...
@@ -40,7 +42,7 @@ def _(text):
...
@@ -40,7 +42,7 @@ def _(text):
# Classes ###########################################################
# Classes ###########################################################
class
MRQBlock
(
QuestionnaireAbstractBlock
):
class
MRQBlock
(
StudentViewUserStateMixin
,
QuestionnaireAbstractBlock
):
"""
"""
An XBlock used to ask multiple-response questions
An XBlock used to ask multiple-response questions
"""
"""
...
...
problem_builder/slider.py
View file @
ef6d54ad
...
@@ -29,7 +29,7 @@ from xblock.fragment import Fragment
...
@@ -29,7 +29,7 @@ from xblock.fragment import Fragment
from
xblockutils.studio_editable
import
StudioEditableXBlockMixin
from
xblockutils.studio_editable
import
StudioEditableXBlockMixin
from
xblockutils.resources
import
ResourceLoader
from
xblockutils.resources
import
ResourceLoader
from
.mixins
import
QuestionMixin
,
XBlockWithTranslationServiceMixin
from
.mixins
import
QuestionMixin
,
XBlockWithTranslationServiceMixin
,
StudentViewUserStateMixin
from
.sub_api
import
sub_api
,
SubmittingXBlockMixin
from
.sub_api
import
sub_api
,
SubmittingXBlockMixin
...
@@ -48,7 +48,8 @@ def _(text):
...
@@ -48,7 +48,8 @@ def _(text):
@XBlock.needs
(
"i18n"
)
@XBlock.needs
(
"i18n"
)
class
SliderBlock
(
class
SliderBlock
(
SubmittingXBlockMixin
,
QuestionMixin
,
StudioEditableXBlockMixin
,
XBlockWithTranslationServiceMixin
,
XBlock
,
SubmittingXBlockMixin
,
QuestionMixin
,
StudioEditableXBlockMixin
,
XBlockWithTranslationServiceMixin
,
StudentViewUserStateMixin
,
XBlock
,
):
):
"""
"""
An XBlock used by students to indicate a numeric value on a sliding scale.
An XBlock used by students to indicate a numeric value on a sliding scale.
...
...
problem_builder/step.py
View file @
ef6d54ad
...
@@ -33,7 +33,7 @@ from xblockutils.studio_editable import (
...
@@ -33,7 +33,7 @@ from xblockutils.studio_editable import (
from
problem_builder.answer
import
AnswerBlock
,
AnswerRecapBlock
from
problem_builder.answer
import
AnswerBlock
,
AnswerRecapBlock
from
problem_builder.completion
import
CompletionBlock
from
problem_builder.completion
import
CompletionBlock
from
problem_builder.mcq
import
MCQBlock
,
RatingBlock
from
problem_builder.mcq
import
MCQBlock
,
RatingBlock
from
problem_builder.mixins
import
EnumerableChildMixin
,
StepParentMixin
from
problem_builder.mixins
import
EnumerableChildMixin
,
StepParentMixin
,
StudentViewUserStateMixin
from
problem_builder.mrq
import
MRQBlock
from
problem_builder.mrq
import
MRQBlock
from
problem_builder.plot
import
PlotBlock
from
problem_builder.plot
import
PlotBlock
from
problem_builder.slider
import
SliderBlock
from
problem_builder.slider
import
SliderBlock
...
@@ -70,7 +70,7 @@ class Correctness(object):
...
@@ -70,7 +70,7 @@ class Correctness(object):
@XBlock.needs
(
'i18n'
)
@XBlock.needs
(
'i18n'
)
class
MentoringStepBlock
(
class
MentoringStepBlock
(
StudioEditableXBlockMixin
,
StudioContainerWithNestedXBlocksMixin
,
XBlockWithPreviewMixin
,
StudioEditableXBlockMixin
,
StudioContainerWithNestedXBlocksMixin
,
XBlockWithPreviewMixin
,
EnumerableChildMixin
,
StepParentMixin
,
XBlock
EnumerableChildMixin
,
StepParentMixin
,
StudentViewUserStateMixin
,
XBlock
):
):
"""
"""
An XBlock for a step.
An XBlock for a step.
...
...
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