"""An XBlock where students can read a question and compose their response"""
importdatetime
importpkg_resources
...
...
@@ -6,6 +7,7 @@ from mako.template import Template
fromxblock.coreimportXBlock
fromxblock.fieldsimportList,Scope,String
fromxblock.fragmentimportFragment
fromsubmissions.apiimportSubmissionRequestError
fromsubmissionsimportapi
fromopenassessment.peerimportapiaspeer_api
...
...
@@ -16,6 +18,89 @@ from scenario_parser import ScenarioParser
mako_default_filters=['unicode','h','trim']
DEFAULT_PROMPT="""
Censorship in the Libraries
'All of us can think of a book that we hope none of our children or any
other children have taken off the shelf. But if I have the right to remove
that book from the shelf -- that work I abhor -- then you also have exactly
the same right and so does everyone else. And then we have no books left on
the shelf for any of us.' --Katherine Paterson, Author
Write a persuasive essay to a newspaper reflecting your views on censorship
in libraries. Do you believe that certain materials, such as books, music,
movies, magazines, etc., should be removed from the shelves if they are
found offensive? Support your position with convincing arguments from your
own experience, observations, and/or reading.
"""
DEFAULT_RUBRIC_INSTRUCTIONS="Read for conciseness, clarity of thought, and form."
DEFAULT_RUBRIC_CRITERIA=[
{
'name':"Ideas",
'instructions':"Determine if there is a unifying theme or main idea.",
'total_value':5,
'options':[
(0,"Poor","Difficult for the reader to discern the main idea. Too brief or too repetitive to establish or maintain a focus.",),
(3,"Fair","Presents a unifying theme or main idea, but may include minor tangents. Stays somewhat focused on topic and task.",),
(5,"Good","Presents a unifying theme or main idea without going off on tangents. Stays completely focused on topic and task.",),
],
},
{
'name':"Content",
'instructions':"Evaluate the content of the submission",
'total_value':5,
'options':[
(0,"Poor","Includes little information with few or no details or unrelated details. Unsuccessful in attempts to explore any facets of the topic.",),
(1,"Fair","Includes little information and few or no details. Explores only one or two facets of the topic.",),
(3,"Good","Includes sufficient information and supporting details. (Details may not be fully developed; ideas may be listed.) Explores some facets of the topic.",),
(5,"Excellent","Includes in-depth information and exceptional supporting details that are fully developed. Explores all facets of the topic.",),
],
},
{
'name':"Organization",
'instructions':"Determine if the submission is well organized.",
'total_value':2,
'options':[
(0,"Poor","Ideas organized illogically, transitions weak, and response difficult to follow.",),
(1,"Fair","Attempts to logically organize ideas. Attempts to progress in an order that enhances meaning, and demonstrates use of transitions.",),
(2,"Good","Ideas organized logically. Progresses in an order that enhances meaning. Includes smooth transitions.",),
],
},
{
'name':"Style",
'instructions':"Read for style.",
'total_value':2,
'options':[
(0,"Poor","Contains limited vocabulary, with many words used incorrectly. Demonstrates problems with sentence patterns.",),
(1,"Fair","Contains basic vocabulary, with words that are predictable and common. Contains mostly simple sentences (although there may be an attempt at more varied sentence patterns).",),
(2,"Good","Includes vocabulary to make explanations detailed and precise. Includes varied sentence patterns, including complex sentences.",),
],
},
{
'name':"Voice",
'instructions':"Read for style.",
'total_value':2,
'options':[
(0,"Poor","Demonstrates language and tone that may be inappropriate to task and reader.",),
(1,"Fair","Demonstrates an attempt to adjust language and tone to task and reader.",),
(2,"Good","Demonstrates effective adjustment of language and tone to task and reader.",),
"""Displays a question and gives an area where students can compose a response."""
start_datetime=String(default=None,scope=Scope.content,help="ISO-8601 formatted string representing the start date of this assignment.")
start_datetime=String(default=datetime.datetime.now().isoformat(),scope=Scope.content,help="ISO-8601 formatted string representing the start date of this assignment.")
due_datetime=String(default=None,scope=Scope.content,help="ISO-8601 formatted string representing the end date of this assignment.")
prompt=String(default=None,scope=Scope.content,help="A prompt to display to a student (plain text).")
rubric=List(default=None,scope=Scope.content,help="Instructions and criteria for students giving feedback.")
rubric_instructions=String(default=None,scope=Scope.content,help="Instructions for self and peer assessment.")
rubric_criteria=List(default=None,scope=Scope.content,help="The different parts of grading for students giving feedback.")
rubric_evals=List(default=None,scope=Scope.content,help="The requested set of evaluations and the order in which to apply them.")
prompt=String(default=DEFAULT_PROMPT,scope=Scope.content,help="A prompt to display to a student (plain text).")
rubric=List(default=[],scope=Scope.content,help="Instructions and criteria for students giving feedback.")
rubric_instructions=String(default=DEFAULT_RUBRIC_INSTRUCTIONS,scope=Scope.content,help="Instructions for self and peer assessment.")
rubric_criteria=List(default=DEFAULT_RUBRIC_CRITERIA,scope=Scope.content,help="The different parts of grading for students giving feedback.")
rubric_evals=List(default=DEFAULT_EVAL_MODULES,scope=Scope.content,help="The requested set of evaluations and the order in which to apply them.")
course_id=String(default=u"TestCourse",scope=Scope.content,help="The course_id associated with this prompt (until we can get it from runtime).",)
submit_errors={# Reported to user sometimes, and useful in tests
...
...
@@ -195,13 +280,23 @@ class OpenAssessmentBlock(XBlock):