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
9e75cf97
Commit
9e75cf97
authored
Jul 16, 2014
by
Will Daly
Committed by
gradyward
Jul 16, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #505 from edx/will/ora-661
Fix date format in template
parents
e84444c8
a03bfd09
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
openassessment/templates/openassessmentblock/edit/oa_edit.html
+2
-2
openassessment/xblock/studio_mixin.py
+24
-3
No files found.
openassessment/templates/openassessmentblock/edit/oa_edit.html
View file @
9e75cf97
...
...
@@ -40,7 +40,7 @@
type=
"text"
class=
"input setting-input"
id=
"openassessment_submission_start_date"
value=
"{{ submission_start|utc|date:"
y
-m-d
"
}}"
value=
"{{ submission_start|utc|date:"
Y
-m-d
"
}}"
>
</div>
<div
class=
"wrapper-comp-setting"
>
...
...
@@ -69,7 +69,7 @@
type=
"text"
class=
"input setting-input"
id=
"openassessment_submission_due_date"
value=
"{{ submission_due|utc|date:"
y
-m-d
"
}}"
value=
"{{ submission_due|utc|date:"
Y
-m-d
"
}}"
>
</div>
<div
class=
"wrapper-comp-setting"
>
...
...
openassessment/xblock/studio_mixin.py
View file @
9e75cf97
...
...
@@ -77,9 +77,7 @@ class StudioMixin(object):
submission_start
,
submission_due
=
date_ranges
[
0
]
assessments
=
self
.
_assessments_editor_context
(
date_ranges
[
1
:])
used_assessments
=
set
(
assessments
.
keys
())
-
{
'training'
}
all_assessments
=
set
([
'student_training'
,
'peer_assessment'
,
'self_assessment'
,
'example_based_assessment'
])
unused_assessments
=
all_assessments
-
used_assessments
used_assessments
,
unused_assessments
=
self
.
_get_assessment_order_and_use
()
# Every rubric requires one criterion. If there is no criteria
# configured for the XBlock, return one empty default criterion, with
...
...
@@ -231,3 +229,26 @@ class StudioMixin(object):
assessments
[
'training'
]
=
{
'examples'
:
[
student_training_template
],
'template'
:
student_training_template
}
return
assessments
def
_get_assessment_order_and_use
(
self
):
"""
Returns the names of assessments that should be displayed to the author, in the format that
our template expects, and in the order in which they are currently stored in the OA problem
definition.
Returns:
Tuple of the form ((list of str), (list of str))
Between the two lists, all of the assessment modules that the author should see are displayed.
"""
used_assessments
=
[]
for
assessment
in
self
.
rubric_assessments
:
used_assessments
.
append
(
assessment
[
'name'
]
.
replace
(
'-'
,
'_'
)
)
# NOTE: This is a perfect opportunity to gate the author to allow or disallow Example Based Assessment.
all_assessments
=
{
'student_training'
,
'peer_assessment'
,
'self_assessment'
,
'example_based_assessment'
}
unused_assessments
=
list
(
all_assessments
-
set
(
used_assessments
))
return
used_assessments
,
unused_assessments
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