assignment show page can show multiple due dates for observers

fixes CNVS-10700

test plan:
  - as a teacher create an assignment w/ many
    different due dates
  - create an observer
    - make observer follow a student in one section
      - assignment show page displays date properly
    - make observer follow a students in many sections
      - assignment show page displays "multiple due date" and tooltip properly
    - make observer follow a student in section w/o date
      - assignmnet show page says there is no date
  - students in multiple sections see the correct date
    on the show page (not multiple dates)

Change-Id: I4e5b3872a69a59f771ca68efd4de36b410de639f
Reviewed-on: https://gerrit.instructure.com/35851
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
This commit is contained in:
Michael Nomitch 2014-06-02 17:54:48 -05:00 committed by Simon Williams
parent 139588c038
commit d458691a49
2 changed files with 17 additions and 10 deletions

View File

@ -4,10 +4,11 @@ require [
'jquery'
'compiled/models/Assignment',
'compiled/views/PublishButtonView',
'compiled/views/assignments/SpeedgraderLinkView'
'compiled/views/assignments/SpeedgraderLinkView',
'compiled/util/vddTooltip',
'compiled/jquery/ModuleSequenceFooter'
'jquery.instructure_forms'
], (INST, I18n, $, Assignment, PublishButtonView, SpeedgraderLinkView) ->
], (INST, I18n, $, Assignment, PublishButtonView, SpeedgraderLinkView, vddTooltip) ->
$ ->
$el = $('#assignment_publish_button')
@ -31,6 +32,8 @@ require [
location: location
)
vddTooltip()
# -- This is all for the _grade_assignment sidebar partial
$ ->
$(".upload_submissions_link").click (event) ->

View File

@ -45,14 +45,18 @@
<ul class='student-assignment-overview'>
<li>
<span class='title'><%= t :due_at, 'Due' %></span>
<span class='value' <%= context_sensitive_datetime_title(@assignment.due_at, @context) %>>
<% if @assignment.due_at %>
<% ot(:date_time_by, "%{date} by %{time}", :date => capture { %>
<span class="display_date"><%= date_string(@assignment.due_at) rescue '' %></span><% }, :time => capture { %>
<span class="display_time"><%= time_string(@assignment.due_at) rescue '' %></span><% }) %>
<% else %>
<%= t :no_due_date, 'No Due Date' %>
<% end %>
<span class='value'>
<span class="date_text">
<% if @assignment.multiple_due_dates? %>
<%= multiple_due_date_tooltip(@assignment, @current_user) %>
<% elsif @assignment.due_at %>
<% ot(:date_time_by, "%{date} by %{time}", :date => capture { %>
<span class="display_date"><%= date_string(@assignment.due_at) rescue '' %></span><% }, :time => capture { %>
<span class="display_time"><%= time_string(@assignment.due_at) rescue '' %></span><% }) %>
<% else %>
<%= t :no_due_date, 'No Due Date' %>
<% end %>
</span>
</span>
</li>
<li>