Commit e43ad942 by Will Daly

Merge pull request #500 from edx/will/authoring-submission-date-fixup

Authoring date fixups
parents e4f4988b 2dbf649b
{% load i18n %} {% load i18n %}
{% load tz %}
{% spaceless %} {% spaceless %}
<div id="openassessment-editor" class="editor-with-buttons editor-with-tabs"> <div id="openassessment-editor" class="editor-with-buttons editor-with-tabs">
<div class="openassessment_editor_content_and_tabs"> <div class="openassessment_editor_content_and_tabs">
...@@ -39,7 +40,7 @@ ...@@ -39,7 +40,7 @@
type="text" type="text"
class="input setting-input" class="input setting-input"
id="openassessment_submission_start_date" id="openassessment_submission_start_date"
value="{{ submission_start|date:"y-m-d" }}" value="{{ submission_start|utc|date:"y-m-d" }}"
> >
</div> </div>
<div class="wrapper-comp-setting"> <div class="wrapper-comp-setting">
...@@ -52,7 +53,7 @@ ...@@ -52,7 +53,7 @@
type="text" type="text"
class="input setting-input" class="input setting-input"
id="openassessment_submission_start_time" id="openassessment_submission_start_time"
value="{{ submission_start|date:"H:i" }}" value="{{ submission_start|utc|date:"H:i" }}"
> >
</div> </div>
<p class="setting-help">{% trans "The date at which submissions will first be accepted." %}</p> <p class="setting-help">{% trans "The date at which submissions will first be accepted." %}</p>
...@@ -68,7 +69,7 @@ ...@@ -68,7 +69,7 @@
type="text" type="text"
class="input setting-input" class="input setting-input"
id="openassessment_submission_due_date" id="openassessment_submission_due_date"
value="{{ submission_due|date:"y-m-d" }}" value="{{ submission_due|utc|date:"y-m-d" }}"
> >
</div> </div>
<div class="wrapper-comp-setting"> <div class="wrapper-comp-setting">
...@@ -81,7 +82,7 @@ ...@@ -81,7 +82,7 @@
type="text" type="text"
class="input setting-input" class="input setting-input"
id="openassessment_submission_due_time" id="openassessment_submission_due_time"
value="{{ submission_due|date:"H:i" }}" value="{{ submission_due|utc|date:"H:i" }}"
> >
</div> </div>
<p class="setting-help">{% trans "The date at which submissions will stop being accepted." %}</p> <p class="setting-help">{% trans "The date at which submissions will stop being accepted." %}</p>
......
...@@ -93,9 +93,6 @@ class StudioMixin(object): ...@@ -93,9 +93,6 @@ class StudioMixin(object):
except: except:
logger.exception("An error occurred while serializing the XBlock") logger.exception("An error occurred while serializing the XBlock")
submission_due = parse_date(self.submission_due).replace(tzinfo=pytz.utc) if self.submission_due else ''
submission_start = parse_date(self.submission_start).replace(tzinfo=pytz.utc) if self.submission_start else ''
# Every rubric requires one criterion. If there is no criteria # Every rubric requires one criterion. If there is no criteria
# configured for the XBlock, return one empty default criterion, with # configured for the XBlock, return one empty default criterion, with
# an empty default option. # an empty default option.
......
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