Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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
edx
edx-ora2
Commits
73b4f8c6
Commit
73b4f8c6
authored
Feb 12, 2014
by
Stephen Sanchez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small changes to xblock for better lms integration
parent
7213266f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
11 deletions
+23
-11
apps/openassessment/xblock/openassessmentblock.py
+21
-9
requirements/base.txt
+2
-2
No files found.
apps/openassessment/xblock/openassessmentblock.py
View file @
73b4f8c6
...
...
@@ -11,6 +11,7 @@ from openassessment.peer import api as peer_api
from
xblock.core
import
XBlock
from
xblock.fields
import
List
,
Scope
,
String
from
xblock.fragment
import
Fragment
from
submissions.api
import
SubmissionRequestError
mako_default_filters
=
[
'unicode'
,
'h'
,
'trim'
]
...
...
@@ -114,11 +115,11 @@ class OpenAssessmentBlock(XBlock):
start_datetime
=
String
(
default
=
None
,
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
=
""
,
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
=
""
,
scope
=
Scope
.
content
,
help
=
"Instructions for self and peer assessment."
)
rubric_criteria
=
List
(
default
=
[]
,
scope
=
Scope
.
content
,
help
=
"The different parts of grading for students giving feedback."
)
rubric_evals
=
List
(
default
=
[]
,
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
...
...
@@ -163,13 +164,20 @@ class OpenAssessmentBlock(XBlock):
trace
=
self
.
_get_xblock_trace
()
student_item_dict
=
self
.
_get_student_item_dict
()
previous_submissions
=
api
.
get_submissions
(
student_item_dict
)
try
:
previous_submissions
=
api
.
get_submissions
(
student_item_dict
)
except
SubmissionRequestError
:
previous_submissions
=
[]
try
:
# HACK: Replace with proper workflow.
peer_submission
=
False
peer_eval
=
self
.
_hack_get_peer_eval
()
peer_submission
=
peer_api
.
get_submission_to_evaluate
(
student_item_dict
,
peer_eval
[
"must_be_graded_by"
])
if
peer_eval
:
peer_submission
=
peer_api
.
get_submission_to_evaluate
(
student_item_dict
,
peer_eval
[
"must_be_graded_by"
])
except
PeerEvaluationWorkflowError
:
p
eer_submission
=
False
p
ass
if
previous_submissions
and
peer_submission
:
# XXX: until workflow better, move on w/ prev submit
html
=
Template
(
load
(
"static/html/oa_rubric.html"
),
...
...
@@ -297,5 +305,9 @@ class OpenAssessmentBlock(XBlock):
@staticmethod
def
workbench_scenarios
():
"""A canned scenario for display in the workbench."""
return
[
EXAMPLE_POVERTY_RUBRIC
,
EXAMPLE_CENSORSHIP_RUBRIC
,]
return
[
EXAMPLE_POVERTY_RUBRIC
,
EXAMPLE_CENSORSHIP_RUBRIC
,
]
def
studio_view
(
self
,
context
=
None
):
return
Fragment
(
u"<div>Edit the XBlock.</div>"
)
requirements/base.txt
View file @
73b4f8c6
...
...
@@ -4,7 +4,7 @@ git+https://github.com/ormsbee/xblock-sdk.git@3c092c27#egg=xblock-sdk
# Third Party Requirements
django==1.4.8
django-extensions==1.
3.3
django-extensions==1.
2.5
djangorestframework==2.3.5
Mako==0.9.1
pytz==201
3.9
pytz==201
2h
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