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
70a563d8
Commit
70a563d8
authored
Jan 11, 2017
by
Albert St. Aubin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the SR feedback announcement and the describedby region for student training
TNL-6243
parent
d2f3dbb4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
32 deletions
+39
-32
openassessment/templates/openassessmentblock/student_training/student_training.html
+21
-23
openassessment/xblock/static/js/openassessment-lms.min.js
+0
-0
openassessment/xblock/static/js/src/lms/oa_training.js
+6
-0
test/acceptance/pages.py
+6
-0
test/acceptance/tests.py
+6
-9
No files found.
openassessment/templates/openassessmentblock/student_training/student_training.html
View file @
70a563d8
...
...
@@ -89,43 +89,41 @@
</button>
</div>
<div
class=
"ui-slidable__content"
aria-labelledby=
"oa_training_{{ xblock_id }}_criterion--{{ criterion.order_num }}"
id=
"oa_training_{{ xblock_id }}_content_criterion--{{ criterion.order_num }}"
>
<div
class=
"step__message message message--correct is--hidden"
>
<div
id=
"training__assessment__rubric__correct__message--{{ criterion.order_num }}__{{ xblock_id }}"
class=
"step__message message message--correct is--hidden"
>
<h5
class=
"message__title"
>
{% trans "Selected Options Agree" %}
</h5>
<div
class=
"message__content"
>
<p>
{% trans "The option you selected is the option that the instructor selected." %}
</p>
</div>
</div>
<div
class=
"step__message message message--incorrect is--hidden"
>
<div
id=
"training__assessment__rubric__incorrect__message--{{ criterion.order_num }}__{{ xblock_id }}"
class=
"step__message message message--incorrect is--hidden"
>
<h5
class=
"message__title"
>
{% trans "Selected Options Differ" %}
</h5>
<div
class=
"message__content"
>
<p>
{% trans "The option you selected is not the option that the instructor selected." %}
</p>
</div>
</div>
<div
class=
"question__answers"
>
<div
role=
"group"
aria-labelledby=
"training__assessment__rubric__prompt--{{ criterion.order_num }}__{{ xblock_id }}"
>
{% for option in criterion.options %}
<div
class=
"answer"
>
<div
class=
"wrapper--input"
>
<input
type=
"radio"
data-criterion-name=
"{{ criterion.name }}"
id=
"training__assessment__rubric__question--{{ criterion.order_num }}__{{ option.order_num }}__{{ xblock_id }}"
class=
"answer__value rubric_{{ criterion.order_num }}_{{ option.order_num }}"
value=
"{{ option.name }}"
name=
"training__assessment__rubric__question--{{ criterion.order_num }}"
aria-describedby=
"training__assessment__rubric__meta--{{ criterion.order_num }}__{{ option.order_num }}__{{ xblock_id }}"
/>
<label
for=
"training__assessment__rubric__question--{{ criterion.order_num }}__{{ option.order_num }}__{{ xblock_id }}"
class=
"answer__label"
>
{{ option.label }}
</label>
</div>
<div
class=
"wrapper--metadata"
id=
"training__assessment__rubric__meta--{{ criterion.order_num }}__{{ option.order_num }}__{{ xblock_id }}"
>
<span
class=
"answer__tip"
>
{{ option.explanation }}
</span>
<span
class=
"answer__points"
>
{{option.points}}
<span
class=
"answer__points__label"
>
{% trans "points" %}
</span></span>
</div>
<div
class=
"question__answers"
role=
"group"
aria-labelledby=
"training__assessment__rubric__prompt--{{ criterion.order_num }}__{{ xblock_id }}"
>
{% for option in criterion.options %}
<div
class=
"answer"
>
<div
class=
"wrapper--input"
>
<input
type=
"radio"
data-criterion-name=
"{{ criterion.name }}"
id=
"training__assessment__rubric__question--{{ criterion.order_num }}__{{ option.order_num }}__{{ xblock_id }}"
class=
"answer__value rubric_{{ criterion.order_num }}_{{ option.order_num }}"
value=
"{{ option.name }}"
name=
"training__assessment__rubric__question--{{ criterion.order_num }}"
aria-describedby=
"training__assessment__rubric__meta--{{ criterion.order_num }}__{{ option.order_num }}__{{ xblock_id }}"
/>
<label
for=
"training__assessment__rubric__question--{{ criterion.order_num }}__{{ option.order_num }}__{{ xblock_id }}"
class=
"answer__label"
>
{{ option.label }}
</label>
</div>
<div
class=
"wrapper--metadata"
id=
"training__assessment__rubric__meta--{{ criterion.order_num }}__{{ option.order_num }}__{{ xblock_id }}"
>
<span
class=
"answer__tip"
>
{{ option.explanation }}
</span>
<span
class=
"answer__points"
>
{{option.points}}
<span
class=
"answer__points__label"
>
{% trans "points" %}
</span></span>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</li>
...
...
openassessment/xblock/static/js/openassessment-lms.min.js
View file @
70a563d8
This diff is collapsed.
Click to expand it.
openassessment/xblock/static/js/src/lms/oa_training.js
View file @
70a563d8
...
...
@@ -98,6 +98,7 @@ OpenAssessment.StudentTrainingView.prototype = {
function
(
corrections
)
{
var
incorrect
=
$
(
".openassessment__student-training--incorrect"
,
view
.
element
);
var
instructions
=
$
(
".openassessment__student-training--instructions"
,
view
.
element
);
var
$questionAnswers
=
$
(
".question__answers"
,
view
.
rubric
.
element
);
if
(
!
view
.
rubric
.
showCorrections
(
corrections
))
{
view
.
load
(
usageID
);
...
...
@@ -107,6 +108,11 @@ OpenAssessment.StudentTrainingView.prototype = {
}
else
{
instructions
.
addClass
(
"is--hidden"
);
incorrect
.
removeClass
(
"is--hidden"
);
$questionAnswers
.
each
(
function
(
index
,
answer
)
{
var
$notification
=
$
(
".step__message.message"
,
view
.
rubric
.
element
).
not
(
".is--hidden"
);
$
(
answer
).
attr
(
'aria-describedby'
,
$
(
$notification
[
index
]).
attr
(
'id'
));
});
baseView
.
srReadTexts
([
gettext
(
'Feedback available for selection.'
)])
}
baseView
.
scrollToTop
(
".step--student-training"
);
}
...
...
test/acceptance/pages.py
View file @
70a563d8
...
...
@@ -41,6 +41,12 @@ class BaseAssessmentPage(PageObject):
def
get_sr_html
(
self
):
return
self
.
q
(
css
=
'.sr.reader-feedback'
)
.
html
def
confirm_feedback_text
(
self
,
text
):
def
is_text_in_feedback
():
return
text
in
self
.
get_sr_html
()[
0
]
self
.
wait_for
(
is_text_in_feedback
,
'Waiting for
%
s, in
%
s'
%
(
text
,
self
.
q
(
css
=
'.sr.reader-feedback'
)
.
html
[
0
]))
class
MultipleAssessmentPage
(
BaseAssessmentPage
):
"""
...
...
test/acceptance/tests.py
View file @
70a563d8
...
...
@@ -790,25 +790,22 @@ class FullWorkflowMixin(object):
(str, str): the username and password of the newly created user
"""
username
,
email
=
self
.
do_submission
()
actual
=
self
.
submission_page
.
get_sr_html
()
EmptyPromise
(
self
.
submission_page
.
button
(
".step--student-training"
)
.
is_focused
(),
"Student training button should be focused"
)
self
.
assertIn
(
'Your Response Complete'
,
actual
[
0
]
)
self
.
assertIn
(
'Learn to Assess Responses In Progress (1 of 2)'
,
actual
[
0
]
)
self
.
submission_page
.
confirm_feedback_text
(
'Your Response Complete'
)
self
.
submission_page
.
confirm_feedback_text
(
'Learn to Assess Responses In Progress (1 of 2)'
)
self
.
do_training
()
actual
=
self
.
submission_page
.
get_sr_html
()
EmptyPromise
(
self
.
submission_page
.
button
(
".step--self-assessment"
)
.
is_focused
(),
"Self assessment button should be focused"
)
self
.
assertIn
(
'Learn to Assess Responses Complete'
,
actual
[
0
]
)
self
.
assertIn
(
'Assess Your Response In Progress'
,
actual
[
0
]
)
self
.
submission_page
.
confirm_feedback_text
(
'Learn to Assess Responses Complete'
)
self
.
submission_page
.
confirm_feedback_text
(
'Assess Your Response In Progress'
)
self
.
submit_self_assessment
(
self
.
SELF_ASSESSMENT
)
actual
=
self
.
submission_page
.
get_sr_html
()
EmptyPromise
(
self
.
submission_page
.
button
(
".step--grade"
)
.
is_focused
(),
"Grade button should be focused"
)
self
.
assertIn
(
'Assess Your Response Complete'
,
actual
[
0
]
)
self
.
assertIn
(
'Assess Peers In Progress (1 of 1)'
,
actual
[
0
]
)
self
.
submission_page
.
confirm_feedback_text
(
'Assess Your Response Complete'
)
self
.
submission_page
.
confirm_feedback_text
(
'Assess Peers In Progress (1 of 1)'
)
return
username
,
email
...
...
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