Commit 84233477 by Will Daly

Merge pull request #150 from edx/will/studio-display-name

Add display name for Studio Advanced Component menu
parents 6543b1ca dfd446ea
from xblock.core import XBlock """
from xblock.fields import Float, Scope Fields and methods used by the LMS and Studio.
"""
from xblock.fields import String, Float, Scope, DateTime
class LmsCompatibilityMixin(object): class LmsCompatibilityMixin(object):
"""Extra methods we tack on because the LMS expects them for grading.""" """
Extra fields and methods used by LMS/Studio.
"""
# Studio the default value for this field to show this XBlock
# in the list of "Advanced Components"
display_name = String(
default="Peer Assessment", scope=Scope.settings,
help="Display name"
)
start = DateTime(
default=None, scope=Scope.settings,
help="ISO-8601 formatted string representing the start date of this assignment."
)
due = DateTime(
default=None, scope=Scope.settings,
help="ISO-8601 formatted string representing the due date of this assignment."
)
weight = Float( weight = Float(
display_name="Problem Weight", display_name="Problem Weight",
help=("Defines the number of points each problem is worth. " help=("Defines the number of points each problem is worth. "
......
...@@ -10,7 +10,7 @@ from django.template.loader import get_template ...@@ -10,7 +10,7 @@ from django.template.loader import get_template
from webob import Response from webob import Response
from xblock.core import XBlock from xblock.core import XBlock
from xblock.fields import DateTime, List, Scope, String, Boolean from xblock.fields import List, Scope, String, Boolean
from xblock.fragment import Fragment from xblock.fragment import Fragment
from openassessment.xblock.grade_mixin import GradeMixin from openassessment.xblock.grade_mixin import GradeMixin
...@@ -169,16 +169,6 @@ class OpenAssessmentBlock( ...@@ -169,16 +169,6 @@ class OpenAssessmentBlock(
LmsCompatibilityMixin): LmsCompatibilityMixin):
"""Displays a question and gives an area where students can compose a response.""" """Displays a question and gives an area where students can compose a response."""
start = DateTime(
default=None, scope=Scope.settings,
help="ISO-8601 formatted string representing the start date of this assignment."
)
due = DateTime(
default=None, scope=Scope.settings,
help="ISO-8601 formatted string representing the due date of this assignment."
)
submission_due = String( submission_due = String(
default=None, scope=Scope.settings, default=None, scope=Scope.settings,
help="ISO-8601 formatted string representing the submission due date." help="ISO-8601 formatted string representing the submission due date."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment