move/reword "Restrict students from viewing..."

test plan:
 - the course and section settings should resemble
   the mockups in the ticket.
 - the "When selected" text should be read when a
   SR user focuses on the "Users can only participate"
   checkbox (aria-describedby relationship)

closes ADMIN-1470

Change-Id: Id3c822eb6b5a91303ff1ff54b03712da0ee7b7b1
Reviewed-on: https://gerrit.instructure.com/167230
Tested-by: Jenkins
Product-Review: Erin Hallmark <erin@instructure.com>
QA-Review: Erin Hallmark <erin@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
This commit is contained in:
Jeremy Stanley 2018-10-05 10:27:17 -06:00
parent 0b2416a334
commit d04ce39bae
3 changed files with 50 additions and 20 deletions

View File

@ -339,6 +339,13 @@ ul.user_list div.enrollment_type.pending {
line-height: 100%;
margin-bottom: 10px;
}
.top-hint {
margin-top: 10px;
margin-bottom: 5px;
}
.bottom-hint {
margin-bottom: 15px;
}
select#course_locale + span {
white-space: nowrap;
}

View File

@ -218,6 +218,13 @@
</span>
<% end %>
</td>
</tr><tr>
<td></td>
<td class="tall-row">
<div class="aside top-hint">
<%= t "Changing course dates may override term availability settings and placement in the Courses page and Dashboard. Please confirm term dates before modifying course dates." %>
</div>
</td>
</tr><tr>
<td class="form-label"><%= f.blabel :start_at, :en => "Starts" %></td>
<td class="nobr">
@ -239,12 +246,11 @@
meaning that the previous day will be the last day this course is active.") %></p></div>">
</i>
<%= f.check_box :restrict_enrollments_to_course_dates %>
<%= f.label :restrict_enrollments_to_course_dates, :en => "Users can only participate in the course between these dates" %>
<%= f.check_box :restrict_enrollments_to_course_dates, "aria-describedby" => 'users-can-only-participate-description' %>
<%= f.label :restrict_enrollments_to_course_dates, :en => "Students can only participate in the course between these dates" %>
</div>
<div class="aside palign">
<%= t('course_overrides_term', %{This will override any term availability settings.}) %>
<div class="aside bottom-hint" id="users-can-only-participate-description">
<%= t "When selected, the course is in a read-only state outside these dates." %>
</div>
<% else %>
<%= datetime_string(@context.conclude_at, :verbose) %>
@ -255,9 +261,26 @@
<td class="form-label"></td>
<td class="nobr">
<%= f.check_box :restrict_enrollments_to_course_dates, :disabled => true %>
<%= f.label :restrict_enrollments_to_course_dates, :en => "Users can only participate in the course between these dates" %>
<%= f.label :restrict_enrollments_to_course_dates, :en => "Students can only participate in the course between these dates" %>
</td>
<% end %>
</tr><tr>
<td></td>
<td class="tall-row">
<div class="nobr" role="group" aria-describedby="restrict-view-description">
<div>
<%= f.check_box :restrict_student_past_view, :disabled => !can_manage || @context.account.restrict_student_past_view[:locked] %>
<%= f.label :restrict_student_past_view, :en => "Restrict students from viewing this course after end date" %>
</div>
<div>
<%= f.check_box :restrict_student_future_view, :disabled => !can_manage || @context.account.restrict_student_future_view[:locked] %>
<%= f.label :restrict_student_future_view, :en => "Restrict students from viewing this course before start date" %>
</div>
</div>
<div class="aside bottom-hint" id="restrict-view-description">
<%= t "When selected, the course is inaccessible outside course dates. If the course dates are blank, these start and end dates apply to the term dates." %>
</div>
</td>
<% if available_locales.size > 1 %>
</tr><tr>
<td class="form-label"><%= f.blabel :locale, :language, :en => "Language" %></td>
@ -348,15 +371,6 @@
<%= f.check_box :indexed, :disabled => !can_manage %>
<%= f.label :indexed, :en => "Include this course in the public course index" %>
</div>
<br/>
<div>
<%= f.check_box :restrict_student_past_view, :disabled => !can_manage || @context.account.restrict_student_past_view[:locked] %>
<%= f.label :restrict_student_past_view, :en => "Restrict students from viewing course after end date" %>
</div>
<div>
<%= f.check_box :restrict_student_future_view, :disabled => !can_manage || @context.account.restrict_student_future_view[:locked] %>
<%= f.label :restrict_student_future_view, :en => "Restrict students from viewing course before start date" %>
</div>
</td>
</tr><tr>
<td class="form-label"><label for="course_course_format"><%= before_label('course_format', %{Format}) %></label></td>

View File

@ -141,6 +141,14 @@ h3 .tally {
</td>
</tr>
<% end %>
<tr>
<td></td>
<td>
<div style="font-size: 0.8em;">
<%= t "Changing section dates may override course and term availability settings and placement in the Courses page and Dashboard. Please confirm term and course dates before modifying section dates." %>
</div>
</td>
</tr>
<tr>
<td>
<%= f.blabel :start_at, en: "Starts" %>
@ -178,11 +186,12 @@ h3 .tally {
</td>
</tr>
<tr>
<td colspan="2">
<%= f.check_box :restrict_enrollments_to_section_dates %>
<%= f.label :restrict_enrollments_to_section_dates, t('access_limit', "Users can only participate in the course between these dates") %>
<div style="font-size: 0.8em; padding-<%= direction('left') %>: 25px;">
<%= t('override_settings', 'This will override any term or course date settings.') %>
<td></td>
<td>
<%= f.check_box :restrict_enrollments_to_section_dates, 'aria-describedby' => 'restrict-enrollments-description' %>
<%= f.label :restrict_enrollments_to_section_dates, t("Students can only participate in the course between these dates") %>
<div style="font-size: 0.8em;" id="restrict-enrollments-description">
<%= t "When selected, the course section is in a read-only state outside these dates." %>
</div>
</td>
</tr>