Commit b3249c01 by Stephen Sanchez

Merge branch 'master' into sanchez/TIM-171-Submission-UI

Conflicts:
	apps/openassessment/xblock/submission_mixin.py
parents 49185e22 7285887e
......@@ -75,6 +75,6 @@
</ol>
<!-- STATUS: problem grade -->
{% include "static/html/oa_grade.html" %}
{% include "oa_grade.html" %}
</div>
</div>
......@@ -270,7 +270,7 @@ class OpenAssessmentBlock(XBlock, SubmissionMixin, PeerAssessmentMixin, SelfAsse
"grade_state": grade_state,
}
template = get_template("static/html/oa_base.html")
template = get_template("oa_base.html")
context = Context(context_dict)
frag = Fragment(template.render(context))
frag.add_css(load("static/css/openassessment.css"))
......@@ -372,7 +372,6 @@ class OpenAssessmentBlock(XBlock, SubmissionMixin, PeerAssessmentMixin, SelfAsse
(Response): A Response Object with the generated HTML fragment. This
is intended for AJAX calls to load dynamically into a larger
document.
"""
if not context_dict:
context_dict = {}
......
......@@ -71,7 +71,7 @@ class PeerAssessmentMixin(object):
if assessment:
peer_sub = self.get_peer_submission(self.get_student_item_dict(), assessment)
context_dict = {"peer_submission": peer_sub}
return self.render_assessment('static/html/oa_peer_assessment.html', context_dict)
return self.render_assessment('oa_peer_assessment.html', context_dict)
def get_peer_submission(self, student_item_dict, assessment):
peer_submission = False
......
......@@ -16,5 +16,5 @@ class SelfAssessmentMixin(object):
@XBlock.handler
def render_self_assessment(self, data, suffix=''):
return self.render_assessment('static/html/oa_self_assessment.html')
return self.render_assessment('oa_self_assessment.html')
......@@ -49,10 +49,9 @@ class SubmissionMixin(object):
student_item_dict = self.get_student_item_dict()
prev_sub = self._get_user_submission(student_item_dict)
if prev_sub:
# It is an error to submit multiple times for the same item
status_tag = 'ENOMULTI'
else:
status_tag = 'ENOMULTI' # It is an error to submit multiple times for the same item
if not prev_sub:
status_tag = 'ENODATA'
try:
response = api.create_submission(student_item_dict, student_sub)
except api.SubmissionRequestError, e:
......@@ -151,11 +150,11 @@ class SubmissionMixin(object):
"step_status": step_status,
}
path = 'static/html/oa_response.html'
path = 'oa_response.html'
if due < datetime.datetime.now() and not student_submission:
path = 'static/html/oa_response_closed.html'
path = 'oa_response_closed.html'
if student_submission:
path = 'static/html/oa_response_submitted.html'
path = 'oa_response_submitted.html'
return self.render_assessment(path, context_dict=context)
......@@ -140,6 +140,7 @@ INSTALLED_APPS = (
# edx-tim apps
'submissions',
'openassessment.peer',
'openassessment',
)
# A sample logging configuration. The only tangible logging
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment