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
ec964c6f
Commit
ec964c6f
authored
Jun 09, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #421 from edx/will/self-then-peer
Self then peer
parents
fa455174
0c0935dd
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
107 additions
and
11 deletions
+107
-11
openassessment/xblock/self_assessment_mixin.py
+2
-1
openassessment/xblock/static/xml/censorship_rubric_example.xml
+1
-1
openassessment/xblock/test/data/assessment_combo.json
+19
-1
openassessment/xblock/test/data/invalid_assessment_combo_order.xml
+1
-1
openassessment/xblock/test/data/self_then_peer.xml
+46
-0
openassessment/xblock/test/test_self.py
+35
-5
openassessment/xblock/test/test_validation.py
+1
-2
openassessment/xblock/validation.py
+2
-0
scripts/data/test-course.tar.gz
+0
-0
No files found.
openassessment/xblock/self_assessment_mixin.py
View file @
ec964c6f
...
...
@@ -64,8 +64,9 @@ class SelfAssessmentMixin(object):
# and `workflow_status` will be None.
workflow
=
self
.
get_workflow_info
()
workflow_status
=
workflow
.
get
(
'status'
)
self_complete
=
workflow
.
get
(
'status_details'
,
{})
.
get
(
'self'
,
{})
.
get
(
'complete'
,
False
)
if
workflow_status
==
'waiting'
or
workflow_status
==
'done'
:
if
self_complete
:
path
=
'openassessmentblock/self/oa_self_complete.html'
elif
workflow_status
==
'self'
or
problem_closed
:
assessment
=
self_api
.
get_assessment
(
workflow
.
get
(
"submission_uuid"
))
...
...
openassessment/xblock/static/xml/censorship_rubric_example.xml
View file @
ec964c6f
...
...
@@ -77,11 +77,11 @@
<select
criterion=
"form"
option=
"Old-timey letters"
/>
</example>
</assessment>
<assessment
name=
"self-assessment"
/>
<assessment
name=
"peer-assessment"
start=
"2013-12-20T19:00-7:00"
due=
"2014-12-21T22:22-7:00"
must_grade=
"1"
must_be_graded_by=
"1"
/>
<assessment
name=
"self-assessment"
/>
</assessments>
</openassessment>
openassessment/xblock/test/data/assessment_combo.json
View file @
ec964c6f
...
...
@@ -37,9 +37,27 @@
"is_released"
:
false
},
"self_before_peer"
:
{
"valid"
:
false
,
"valid"
:
true
,
"assessments"
:
[
{
"name"
:
"self-assessment"
},
{
"name"
:
"peer-assessment"
,
"must_grade"
:
5
,
"must_be_graded_by"
:
3
}
],
"current_assessments"
:
null
,
"is_released"
:
false
},
"student_training_self_then_peer"
:
{
"valid"
:
true
,
"assessments"
:
[
{
"name"
:
"student-training"
},
{
"name"
:
"self-assessment"
},
{
...
...
openassessment/xblock/test/data/invalid_assessment_combo_order.xml
View file @
ec964c6f
...
...
@@ -16,7 +16,7 @@
</criterion>
</rubric>
<assessments>
<assessment
name=
"
self
-assessment"
/>
<assessment
name=
"
peer
-assessment"
/>
<assessment
name=
"peer-assessment"
/>
</assessments>
</openassessment>
openassessment/xblock/test/data/self_then_peer.xml
0 → 100644
View file @
ec964c6f
<openassessment>
<title>
Open Assessment Test
</title>
<prompt>
Given the state of the world today, what do you think should be done to
combat poverty? Please answer in a short essay of 200-300 words.
</prompt>
<rubric>
<prompt>
Read for conciseness, clarity of thought, and form.
</prompt>
<criterion>
<name>
𝓒𝓸𝓷𝓬𝓲𝓼𝓮
</name>
<prompt>
How concise is it?
</prompt>
<option
points=
"3"
>
<name>
ﻉซƈﻉɭɭﻉกՇ
</name>
<explanation>
Extremely concise
</explanation>
</option>
<option
points=
"2"
>
<name>
Ġööḋ
</name>
<explanation>
Concise
</explanation>
</option>
<option
points=
"1"
>
<name>
ק๏๏г
</name>
<explanation>
Wordy
</explanation>
</option>
</criterion>
<criterion>
<name>
Form
</name>
<prompt>
How well-formed is it?
</prompt>
<option
points=
"3"
>
<name>
Good
</name>
<explanation>
Good
</explanation>
</option>
<option
points=
"2"
>
<name>
Fair
</name>
<explanation>
Fair
</explanation>
</option>
<option
points=
"1"
>
<name>
Poor
</name>
<explanation>
Poor
</explanation>
</option>
</criterion>
</rubric>
<assessments>
<assessment
name=
"self-assessment"
/>
<assessment
name=
"peer-assessment"
must_grade=
"5"
must_be_graded_by=
"3"
/>
</assessments>
</openassessment>
openassessment/xblock/test/test_self.py
View file @
ec964c6f
...
...
@@ -168,15 +168,36 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
@scenario
(
'data/self_assessment_open.xml'
,
user_id
=
'James Brown'
)
def
test_open_in_waiting_for_peer_step
(
self
,
xblock
):
#
Simulate the workflow status being "waiting"
#
Currently, this implies that we've completed the self assessment module,
#
but this may change in the future
.
#
In the peer-->self configuration, if we're done with the
#
self step, but not with the peer step (because we're waiting
#
to be assessed), then the self step should display as completed
.
xblock
.
create_submission
(
xblock
.
get_student_item_dict
(),
u"𝓟𝓪𝓼𝓼 𝓽𝓱𝓮 𝓹𝓮𝓪𝓼"
)
self
.
_assert_path_and_context
(
xblock
,
'openassessmentblock/self/oa_self_complete.html'
,
{},
workflow_status
=
'waiting'
workflow_status
=
'waiting'
,
status_details
=
{
'self'
:
{
'complete'
:
True
},
'peer'
:
{
'complete'
:
False
}
}
)
@scenario
(
'data/self_then_peer.xml'
,
user_id
=
"The Bee Gees"
)
def
test_self_then_peer
(
self
,
xblock
):
xblock
.
create_submission
(
xblock
.
get_student_item_dict
(),
u"Stayin' alive!"
)
# In the self --> peer configuration, self can be complete
# if our status is "peer"
self
.
_assert_path_and_context
(
xblock
,
'openassessmentblock/self/oa_self_complete.html'
,
{},
workflow_status
=
"peer"
,
status_details
=
{
'self'
:
{
'complete'
:
True
},
'peer'
:
{
'complete'
:
False
}
}
)
@scenario
(
'data/self_assessment_open.xml'
,
user_id
=
'James Brown'
)
...
...
@@ -296,7 +317,8 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
def
_assert_path_and_context
(
self
,
xblock
,
expected_path
,
expected_context
,
workflow_status
=
None
,
submission_uuid
=
None
workflow_status
=
None
,
status_details
=
None
,
submission_uuid
=
None
):
"""
Render the self assessment step and verify:
...
...
@@ -310,11 +332,19 @@ class TestSelfAssessmentRender(XBlockHandlerTestCase):
Kwargs:
workflow_status (str): If provided, simulate this status from the workflow API.
workflow_status (str): If provided, simulate these details from the workflow API.
submission_uuid (str): If provided, simulate this submision UUI for the current workflow.
"""
if
workflow_status
is
not
None
:
# Assume a peer-->self flow by default
if
status_details
is
None
:
status_details
=
{
'peer'
:
{
'complete'
:
workflow_status
==
'done'
},
'self'
:
{
'complete'
:
workflow_status
in
[
'waiting'
,
'done'
]}
}
xblock
.
get_workflow_info
=
mock
.
Mock
(
return_value
=
{
'status'
:
workflow_status
,
'status_details'
:
status_details
,
'submission_uuid'
:
submission_uuid
})
path
,
context
=
xblock
.
self_path_and_context
()
...
...
openassessment/xblock/test/test_validation.py
View file @
ec964c6f
...
...
@@ -33,8 +33,7 @@ class AssessmentValidationTest(TestCase):
self
.
assertFalse
(
success
)
self
.
assertGreater
(
len
(
msg
),
0
)
# Make sure only legal assessment combinations are allowed. For now, that's
# (peer -> self), and (self)
# Make sure only legal assessment combinations are allowed.
@ddt.file_data
(
'data/assessment_combo.json'
)
def
test_enforce_assessment_combo_restrictions
(
self
,
data
):
self
.
_assert_validation
(
...
...
openassessment/xblock/validation.py
View file @
ec964c6f
...
...
@@ -62,8 +62,10 @@ def _is_valid_assessment_sequence(assessments):
[
'self-assessment'
],
[
'peer-assessment'
],
[
'peer-assessment'
,
'self-assessment'
],
[
'self-assessment'
,
'peer-assessment'
],
[
'student-training'
,
'peer-assessment'
],
[
'student-training'
,
'peer-assessment'
,
'self-assessment'
],
[
'student-training'
,
'self-assessment'
,
'peer-assessment'
],
]
sequence
=
[
asmnt
.
get
(
'name'
)
for
asmnt
in
assessments
]
...
...
scripts/data/test-course.tar.gz
View file @
ec964c6f
No preview for this file type
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