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
4a9a153c
Commit
4a9a153c
authored
Feb 07, 2014
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for date serialization error, plus real total point calculation.
parent
20f23e1e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
apps/openassessment/xblock/openassessmentblock.py
+14
-5
requirements/base.txt
+0
-1
requirements/dev.txt
+1
-0
No files found.
apps/openassessment/xblock/openassessmentblock.py
View file @
4a9a153c
...
@@ -106,12 +106,17 @@ class OpenAssessmentBlock(XBlock):
...
@@ -106,12 +106,17 @@ class OpenAssessmentBlock(XBlock):
@XBlock.json_handler
@XBlock.json_handler
def
assess
(
self
,
data
,
suffix
=
''
):
def
assess
(
self
,
data
,
suffix
=
''
):
"""Place an assessment into Openassessment system"""
"""Place an assessment into Openassessment system"""
# TODO: We're not doing points possible
, right way to do points possible
# TODO: We're not doing points possible
in a good way, need to refactor
#
is to refactor
the rubric criteria type, Joe has thoughts on this.
# the rubric criteria type, Joe has thoughts on this.
student_item_dict
=
self
.
_get_student_item_dict
()
student_item_dict
=
self
.
_get_student_item_dict
()
points_possible
=
sum
(
max
(
int
(
val
)
for
val
in
criteria
if
val
.
isdigit
())
for
criteria
in
self
.
rubric_criteria
)
assessment_dict
=
{
assessment_dict
=
{
"points_earned"
:
map
(
int
,
data
[
"points_earned"
]),
"points_earned"
:
map
(
int
,
data
[
"points_earned"
]),
"points_possible"
:
12
,
"points_possible"
:
points_possible
,
"feedback"
:
"Not yet implemented."
,
"feedback"
:
"Not yet implemented."
,
}
}
evaluation
=
peer_api
.
create_evaluation
(
evaluation
=
peer_api
.
create_evaluation
(
...
@@ -119,6 +124,10 @@ class OpenAssessmentBlock(XBlock):
...
@@ -119,6 +124,10 @@ class OpenAssessmentBlock(XBlock):
student_item_dict
[
"student_id"
],
student_item_dict
[
"student_id"
],
assessment_dict
assessment_dict
)
)
# Temp kludge until we fix JSON serialization for datetime
evaluation
[
"scored_at"
]
=
str
(
evaluation
[
"scored_at"
])
return
evaluation
,
"Success"
return
evaluation
,
"Success"
@XBlock.json_handler
@XBlock.json_handler
...
@@ -210,7 +219,7 @@ class OpenAssessmentBlock(XBlock):
...
@@ -210,7 +219,7 @@ class OpenAssessmentBlock(XBlock):
<option val="1">Hunter S. Thompson</option>
<option val="1">Hunter S. Thompson</option>
<option val="2">Robert Heinlein</option>
<option val="2">Robert Heinlein</option>
<option val="3">Isaac Asimov</option>
<option val="3">Isaac Asimov</option>
<option val="
55
">Spock</option>
<option val="
10
">Spock</option>
</criterion>
</criterion>
<criterion name="form">
<criterion name="form">
Lastly, how is it's form? Punctuation, grammar, and spelling all count.
Lastly, how is it's form? Punctuation, grammar, and spelling all count.
...
@@ -219,7 +228,7 @@ class OpenAssessmentBlock(XBlock):
...
@@ -219,7 +228,7 @@ class OpenAssessmentBlock(XBlock):
<option val="2">Reddit</option>
<option val="2">Reddit</option>
<option val="3">metafilter</option>
<option val="3">metafilter</option>
<option val="4">Usenet, 1996</option>
<option val="4">Usenet, 1996</option>
<option val="
99
">The Elements of Style</option>
<option val="
5
">The Elements of Style</option>
</criterion>
</criterion>
</rubric>
</rubric>
<evals>
<evals>
...
...
requirements/base.txt
View file @
4a9a153c
...
@@ -8,4 +8,3 @@ django-extensions==1.3.3
...
@@ -8,4 +8,3 @@ django-extensions==1.3.3
djangorestframework==2.3.5
djangorestframework==2.3.5
Mako==0.9.1
Mako==0.9.1
pytz==2013.9
pytz==2013.9
django-pdb==0.3.2
requirements/dev.txt
View file @
4a9a153c
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
# Debug tools
# Debug tools
bpython==0.12
bpython==0.12
django-debug-toolbar==0.11.0
django-debug-toolbar==0.11.0
django-pdb==0.3.2
sqlparse==0.1.10
sqlparse==0.1.10
# Doc generation
# Doc generation
...
...
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