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
3f816d0a
Commit
3f816d0a
authored
Feb 02, 2015
by
Usman Khalid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Student training steps shows example submissions in new format.
TNL-708
parent
2c2192b7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
7 deletions
+20
-7
openassessment/templates/openassessmentblock/student_training/student_training.html
+2
-3
openassessment/xblock/student_training_mixin.py
+2
-2
openassessment/xblock/test/data/student_training_mixin.json
+3
-1
openassessment/xblock/test/test_student_training.py
+13
-1
No files found.
openassessment/templates/openassessmentblock/student_training/student_training.html
View file @
3f816d0a
...
@@ -72,9 +72,8 @@
...
@@ -72,9 +72,8 @@
{% endwith %}
{% endwith %}
</header>
</header>
<div
class=
"student-training__display__response"
>
{% include "openassessmentblock/oa_submission_answer.html" with answer=training_essay.answer answer_text_label="The response to the question above:" %}
{{ training_essay|linebreaks }}
</div>
</article>
</article>
<form
id=
"student-training--001__assessment"
class=
"student-training__assessment"
method=
"post"
>
<form
id=
"student-training--001__assessment"
class=
"student-training__assessment"
method=
"post"
>
...
...
openassessment/xblock/student_training_mixin.py
View file @
3f816d0a
...
@@ -7,7 +7,7 @@ from xblock.core import XBlock
...
@@ -7,7 +7,7 @@ from xblock.core import XBlock
from
openassessment.assessment.api
import
student_training
from
openassessment.assessment.api
import
student_training
from
openassessment.workflow
import
api
as
workflow_api
from
openassessment.workflow
import
api
as
workflow_api
from
openassessment.workflow.errors
import
AssessmentWorkflowError
from
openassessment.workflow.errors
import
AssessmentWorkflowError
from
openassessment.xblock.data_conversion
import
convert_training_examples_list_to_dict
from
openassessment.xblock.data_conversion
import
convert_training_examples_list_to_dict
,
create_submission_dict
from
.resolve_dates
import
DISTANT_FUTURE
from
.resolve_dates
import
DISTANT_FUTURE
...
@@ -124,7 +124,7 @@ class StudentTrainingMixin(object):
...
@@ -124,7 +124,7 @@ class StudentTrainingMixin(object):
examples
examples
)
)
if
example
:
if
example
:
context
[
'training_essay'
]
=
example
[
'answer'
]
context
[
'training_essay'
]
=
create_submission_dict
({
'answer'
:
example
[
'answer'
]},
self
.
prompts
)
context
[
'training_rubric'
]
=
{
context
[
'training_rubric'
]
=
{
'criteria'
:
example
[
'rubric'
][
'criteria'
],
'criteria'
:
example
[
'rubric'
][
'criteria'
],
'points_possible'
:
example
[
'rubric'
][
'points_possible'
]
'points_possible'
:
example
[
'rubric'
][
'points_possible'
]
...
...
openassessment/xblock/test/data/student_training_mixin.json
View file @
3f816d0a
...
@@ -8,7 +8,9 @@
...
@@ -8,7 +8,9 @@
"training_essay"
:
{
"answer"
:
{
"training_essay"
:
{
"answer"
:
{
"parts"
:
[
"parts"
:
[
{
{
"prompt"
:
"Given the state of the world today, what do you think should be done to combat poverty?"
,
"prompt"
:
{
"description"
:
"Given the state of the world today, what do you think should be done to combat poverty?"
},
"text"
:
"This is my answer."
"text"
:
"This is my answer."
}
}
]}
]}
...
...
openassessment/xblock/test/test_student_training.py
View file @
3f816d0a
...
@@ -155,7 +155,19 @@ class StudentTrainingAssessTest(StudentTrainingTest):
...
@@ -155,7 +155,19 @@ class StudentTrainingAssessTest(StudentTrainingTest):
expected_context
[
"training_num_completed"
]
=
1
expected_context
[
"training_num_completed"
]
=
1
expected_context
[
"training_num_current"
]
=
2
expected_context
[
"training_num_current"
]
=
2
expected_context
[
"training_essay"
]
=
u"тєѕт αηѕωєя"
expected_context
[
"training_essay"
]
=
{
'answer'
:
{
'parts'
:
[
{
'text'
:
u"тєѕт αηѕωєя"
,
'prompt'
:
{
'description'
:
u'Given the state of the world today, what do you think should be done to combat poverty?'
}
}
]
}
}
self
.
assert_path_and_context
(
xblock
,
expected_template
,
expected_context
)
self
.
assert_path_and_context
(
xblock
,
expected_template
,
expected_context
)
resp
=
self
.
request
(
xblock
,
'training_assess'
,
json
.
dumps
(
selected_data
),
response_format
=
'json'
)
resp
=
self
.
request
(
xblock
,
'training_assess'
,
json
.
dumps
(
selected_data
),
response_format
=
'json'
)
...
...
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