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
debccd19
Commit
debccd19
authored
Feb 13, 2014
by
Stephen Sanchez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up a bit further with the templates.
parent
ddcf19c2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
33 deletions
+13
-33
apps/openassessment/xblock/openassessmentblock.py
+12
-13
apps/openassessment/xblock/static/html/oa_peer_evaluation.html
+0
-0
apps/openassessment/xblock/static/html/oa_response.html
+0
-0
apps/openassessment/xblock/static/html/oa_self_evaluation.html
+0
-0
apps/openassessment/xblock/static/js/src/oa_submission.js
+1
-20
No files found.
apps/openassessment/xblock/openassessmentblock.py
View file @
debccd19
...
@@ -227,8 +227,7 @@ class OpenAssessmentBlock(XBlock):
...
@@ -227,8 +227,7 @@ class OpenAssessmentBlock(XBlock):
student_item_dict
=
self
.
_get_student_item_dict
()
student_item_dict
=
self
.
_get_student_item_dict
()
points_possible
=
sum
(
points_possible
=
sum
(
max
(
int
(
val
)
for
val
in
criteria
if
val
.
isdigit
())
int
(
val
)
for
val
,
_
in
self
.
rubric_criteria
[
"options"
]
for
criteria
in
self
.
rubric_criteria
)
)
assessment_dict
=
{
assessment_dict
=
{
"points_earned"
:
map
(
int
,
data
[
"points_earned"
]),
"points_earned"
:
map
(
int
,
data
[
"points_earned"
]),
...
@@ -290,8 +289,13 @@ class OpenAssessmentBlock(XBlock):
...
@@ -290,8 +289,13 @@ class OpenAssessmentBlock(XBlock):
crit
=
{
'name'
:
criterion
.
attrib
.
get
(
'name'
,
''
),
crit
=
{
'name'
:
criterion
.
attrib
.
get
(
'name'
,
''
),
'instructions'
:
criterion
.
text
.
strip
(),
'instructions'
:
criterion
.
text
.
strip
(),
}
}
options
=
[]
for
option
in
criterion
:
for
option
in
criterion
:
crit
[
option
.
attrib
[
'val'
]]
=
option
.
text
.
strip
()
options
.
append
(
(
option
.
attrib
[
'val'
],
option
.
text
.
strip
(),)
)
crit
[
"options"
]
=
sorted
(
options
)
block
.
rubric_criteria
.
append
(
crit
)
block
.
rubric_criteria
.
append
(
crit
)
elif
child
.
tag
==
'evals'
:
elif
child
.
tag
==
'evals'
:
block
.
rubric_evals
=
[]
block
.
rubric_evals
=
[]
...
@@ -320,18 +324,13 @@ class OpenAssessmentBlock(XBlock):
...
@@ -320,18 +324,13 @@ class OpenAssessmentBlock(XBlock):
return
[
EXAMPLE_POVERTY_RUBRIC
,
EXAMPLE_CENSORSHIP_RUBRIC
,]
return
[
EXAMPLE_POVERTY_RUBRIC
,
EXAMPLE_CENSORSHIP_RUBRIC
,]
def
_get_grade_state
(
self
,
student_item
):
def
_get_grade_state
(
self
,
student_item
):
peer_eval
=
self
.
_hack_get_peer_eval
()
# TODO: Determine if we want to build out grade state right now.
submissions
=
api
.
get_submissions
(
student_item
,
1
)
has_finished_evaluating
=
peer_api
.
has_finished_required_evaluating
(
student_item
[
"student_id"
],
peer_eval
.
must_grade
)
score
=
api
.
get_score
(
student_item
)
grade_state
=
{
grade_state
=
{
"style_class"
:
""
,
"style_class"
:
"
is--incomplete
"
,
"value"
:
""
,
"value"
:
"
Incomplete
"
,
"title"
:
""
,
"title"
:
"
Your Grade:
"
,
"message"
:
""
,
"message"
:
"
You have not started this problem
"
,
}
}
return
grade_state
return
grade_state
...
...
apps/openassessment/xblock/static/html/oa_peer_evaluation.html
View file @
debccd19
This diff is collapsed.
Click to expand it.
apps/openassessment/xblock/static/html/oa_response.html
View file @
debccd19
This diff is collapsed.
Click to expand it.
apps/openassessment/xblock/static/html/oa_self_evaluation.html
View file @
debccd19
This diff is collapsed.
Click to expand it.
apps/openassessment/xblock/static/js/src/oa_submission.js
View file @
debccd19
...
@@ -7,21 +7,7 @@ function OpenAssessmentBlock(runtime, element) {
...
@@ -7,21 +7,7 @@ function OpenAssessmentBlock(runtime, element) {
var
click_msg
=
'<p class="clickhere">(click here to dismiss this message)</p>'
;
var
click_msg
=
'<p class="clickhere">(click here to dismiss this message)</p>'
;
/* Sample Debug Console: http://localhost:8000/submissions/Joe_Bloggs/TestCourse/u_3 */
/* Sample Debug Console: http://localhost:8000/submissions/Joe_Bloggs/TestCourse/u_3 */
function
displayStatus
(
result
)
{
$
(
'.action action--submit step--response__submit'
,
element
).
click
(
function
(
eventObject
)
{
status
=
result
[
0
]
error_msg
=
result
[
2
]
if
(
status
)
{
$
(
'.openassessment_response_status_block'
,
element
).
html
(
success_msg
.
concat
(
click_msg
));
}
else
{
$
(
'.openassessment_response_status_block'
,
element
).
html
(
failure_msg
.
concat
(
error_msg
).
concat
(
click_msg
));
}
$
(
'.openassessment_response_status_block'
,
element
).
css
(
'display'
,
'block'
);
}
$
(
'.openassessment_response_status_block'
,
element
).
click
(
function
(
eventObject
)
{
$
(
'.openassessment_response_status_block'
,
element
).
css
(
'display'
,
'none'
);
});
$
(
'.openassessment_submit'
,
element
).
click
(
function
(
eventObject
)
{
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
handlerUrl
,
url
:
handlerUrl
,
...
@@ -29,10 +15,5 @@ function OpenAssessmentBlock(runtime, element) {
...
@@ -29,10 +15,5 @@ function OpenAssessmentBlock(runtime, element) {
success
:
displayStatus
success
:
displayStatus
});
});
});
});
$
(
function
(
$
)
{
/* Here's where you'd do things on page load. */
$
(
element
).
css
(
'background-color'
,
'LightBlue'
)
});
}
}
/* END Javascript for OpenassessmentComposeXBlock. */
/* END Javascript for OpenassessmentComposeXBlock. */
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