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
50b39be9
Commit
50b39be9
authored
Nov 24, 2015
by
Diana Huang
Committed by
Andy Armstrong
Dec 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Have turbo mode use the rubric template.
Add a test to verify that it is working as expected.
parent
1b03e14a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
81 deletions
+96
-81
openassessment/templates/openassessmentblock/peer/oa_peer_turbo_mode.html
+1
-71
openassessment/xblock/static/js/fixtures/templates.json
+76
-0
openassessment/xblock/static/js/spec/lms/oa_peer.js
+19
-10
No files found.
openassessment/templates/openassessmentblock/peer/oa_peer_turbo_mode.html
View file @
50b39be9
...
...
@@ -56,77 +56,7 @@
</div>
<form
id=
"peer-assessment--001__assessment"
class=
"peer-assessment__assessment"
method=
"post"
>
<fieldset
class=
"assessment__fields"
>
<ol
class=
"list list--fields assessment__rubric"
>
{% for criterion in rubric_criteria %}
<li
class=
"field field--radio is--required assessment__rubric__question ui-toggle-visibility {% if criterion.options %}has--options{% endif %}"
id=
"peer__assessment__rubric__question--{{ criterion.order_num }}"
>
<h4
class=
"question__title ui-toggle-visibility__control"
>
<i
class=
"icon fa fa-caret-right"
aria-hidden=
"true"
></i>
<span
class=
"ui-toggle-visibility__control__copy question__title__copy"
>
{{ criterion.prompt }}
</span>
<span
class=
"label--required sr"
>
* ({% trans "Required" %})
</span>
</h4>
<div
class=
"ui-toggle-visibility__content"
>
<ol
class=
"question__answers"
>
{% for option in criterion.options %}
<li
class=
"answer"
>
<div
class=
"wrapper--input"
>
<input
type=
"radio"
name=
"{{ criterion.name }}"
id=
"peer__assessment__rubric__question--{{ criterion.order_num }}__{{ option.order_num }}"
class=
"answer__value"
value=
"{{ option.name }}"
/>
<label
for=
"peer__assessment__rubric__question--{{ criterion.order_num }}__{{ option.order_num }}"
class=
"answer__label"
>
{{ option.label }}
</label>
</div>
<div
class=
"wrapper--metadata"
>
<span
class=
"answer__tip"
>
{{ option.explanation }}
</span>
<span
class=
"answer__points"
>
{{option.points}}
<span
class=
"answer__points__label"
>
{% trans "points" %}
</span></span>
</div>
</li>
{% endfor %}
{% if criterion.feedback == 'optional' or criterion.feedback == 'required' %}
<li
class=
"answer--feedback"
>
<div
class=
"wrapper--input"
>
<label
for=
"peer__assessment__rubric__question--{{ criterion.order_num }}__feedback"
class=
"answer__label"
>
{% trans "Comments" %}
</label>
<textarea
id=
"peer__assessment__rubric__question--{{ criterion.order_num }}__feedback"
class=
"answer__value"
value=
"{{ criterion.name }}"
name=
"{{ criterion.name }}"
maxlength=
"1000"
{%
if
criterion
.
feedback =
=
'
required
'
%}
required
{%
endif
%}
>
</textarea>
</div>
</li>
{% endif %}
</ol>
</div>
</li>
{% endfor %}
<li
class=
"wrapper--input field field--textarea assessment__rubric__question assessment__rubric__question--feedback"
>
<label
class=
"question__title"
for=
"peer__assessment__rubric__question--feedback__value"
>
<span
class=
"question__title__copy"
>
{{ rubric_feedback_prompt }}
</span>
</label>
<div
class=
"wrapper--input"
>
<textarea
id=
"peer__assessment__rubric__question--feedback__value"
placeholder=
"{{ rubric_feedback_default_text }}"
maxlength=
"500"
>
</textarea>
</div>
</li>
</ol>
</fieldset>
{% include "openassessmentblock/oa_rubric.html" with rubric_type="peer" %}
</form>
</article>
</li>
...
...
openassessment/xblock/static/js/fixtures/templates.json
View file @
50b39be9
...
...
@@ -921,5 +921,81 @@
]
},
"output"
:
"oa_rubric.html"
},
{
"template"
:
"openassessmentblock/peer/oa_peer_turbo_mode.html"
,
"context"
:
{
"rubric_criteria"
:
[
{
"name"
:
"Criterion 1"
,
"prompt"
:
"Prompt 1"
,
"order_num"
:
0
,
"feedback"
:
"optional"
,
"options"
:
[
{
"order_num"
:
0
,
"points"
:
0
,
"name"
:
"Poor"
},
{
"order_num"
:
1
,
"points"
:
1
,
"name"
:
"Fair"
},
{
"order_num"
:
2
,
"points"
:
2
,
"name"
:
"Good"
}
]
},
{
"name"
:
"Criterion 2"
,
"prompt"
:
"Prompt 2"
,
"order_num"
:
1
,
"options"
:
[
{
"order_num"
:
0
,
"points"
:
0
,
"name"
:
"Poor"
},
{
"order_num"
:
1
,
"points"
:
1
,
"name"
:
"Fair"
},
{
"order_num"
:
2
,
"points"
:
2
,
"name"
:
"Good"
}
]
},
{
"name"
:
"Criterion 3"
,
"prompt"
:
"Prompt 3"
,
"order_num"
:
2
,
"feedback"
:
"optional"
,
"options"
:
[
{
"order_num"
:
0
,
"points"
:
0
,
"name"
:
"Poor"
},
{
"order_num"
:
1
,
"points"
:
1
,
"name"
:
"Fair"
},
{
"order_num"
:
2
,
"points"
:
2
,
"name"
:
"Good"
}
]
}
]
},
"output"
:
"oa_turbo_mode.html"
}
]
openassessment/xblock/static/js/spec/lms/oa_peer.js
View file @
50b39be9
...
...
@@ -39,14 +39,7 @@ describe("OpenAssessment.PeerView", function() {
return
view
;
};
beforeEach
(
function
()
{
// Create a new stub server
server
=
new
StubServer
();
server
.
renderLatex
=
jasmine
.
createSpy
(
'renderLatex'
);
});
it
(
"Sends a peer assessment to the server"
,
function
()
{
var
view
=
createPeerAssessmentView
(
'oa_peer_assessment.html'
);
var
submitPeerAssessment
=
function
(
view
)
{
spyOn
(
server
,
'peerAssess'
).
and
.
callThrough
();
// Select options in the rubric
...
...
@@ -74,9 +67,20 @@ describe("OpenAssessment.PeerView", function() {
expect
(
server
.
peerAssess
).
toHaveBeenCalledWith
(
optionsSelected
,
criterionFeedback
,
overallFeedback
,
''
);
};
beforeEach
(
function
()
{
// Create a new stub server
server
=
new
StubServer
();
server
.
renderLatex
=
jasmine
.
createSpy
(
'renderLatex'
);
});
it
(
"Re-enables the peer assess button on error"
,
function
()
{
it
(
"sends a peer assessment to the server"
,
function
()
{
var
view
=
createPeerAssessmentView
(
'oa_peer_assessment.html'
);
submitPeerAssessment
(
view
);
});
it
(
"re-enables the peer assess button on error"
,
function
()
{
var
view
=
createPeerAssessmentView
(
'oa_peer_assessment.html'
);
// Simulate a server error
spyOn
(
server
,
'peerAssess'
).
and
.
callFake
(
function
()
{
...
...
@@ -91,7 +95,7 @@ describe("OpenAssessment.PeerView", function() {
expect
(
view
.
peerSubmitEnabled
()).
toBe
(
true
);
});
it
(
"
R
e-enables the continued grading button on error"
,
function
()
{
it
(
"
r
e-enables the continued grading button on error"
,
function
()
{
var
view
=
createPeerAssessmentView
(
'oa_peer_complete.html'
);
// Simulate a server error
...
...
@@ -106,4 +110,9 @@ describe("OpenAssessment.PeerView", function() {
// Expect the submit button to have been re-enabled
expect
(
view
.
continueAssessmentEnabled
()).
toBe
(
true
);
});
it
(
"can submit assessments in turbo mode"
,
function
()
{
var
view
=
createPeerAssessmentView
(
'oa_turbo_mode.html'
);
submitPeerAssessment
(
view
);
});
});
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