Skip to content

Commit

Permalink
Add a popover to the user detail date tables for test versions with a…
Browse files Browse the repository at this point in the history
…dvice.

The advice is to consider alternatve measures to changing dates for
test versions.

Also remove the `ms-auto` class added to the dates table for test
versions.  The alignment is still not right with that.
  • Loading branch information
drgrice1 committed Mar 2, 2024
1 parent 4164a7c commit f70b0c9
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,24 @@
% my $isVersioned = $isGateway && defined $mergedRecord && $mergedRecord->can('version_id');
% $setID .= ',v' . $mergedRecord->version_id if $isVersioned;
%
<table <%== $isVersioned ? ' class="ms-auto"' : '' %>>
<table>
<tr>
% unless ($isVersioned) {
<th scope="col" colspan="2">
<%= maketext('Assignment Dates') =%>
</th>
% }
% if (defined $userRecord) {
<th scope="col" <%== (defined $userRecord && !$isVersioned) ? '' : 'colspan="2"' %>>
<th scope="col" <%== defined $userRecord && !$isVersioned ? '' : 'colspan="2"' %>>
% if ($isVersioned) {
<a tabindex="0" class="help-popup" role="button" data-bs-toggle="popover" data-bs-trigger="focus"
data-bs-content="<%= maketext(
'If the test was timed, granting the user an additional version '
. 'may be preferred to changing its dates.' )%>">
<i class="icon fa-solid fa-question-circle fa-lg" aria-hidden="true"></i><% =%>\
<span class="visually-hidden"><%= maketext('Help Icon') %></span><% =%>\
</a>
% }
<%= $isVersioned ? maketext(q{User's Test Version Dates}) : maketext('User Overrides') =%>
</th>
% }
Expand Down Expand Up @@ -48,8 +57,7 @@
<%= text_field "set.$setID.$field" =>
defined $userRecord ? $userRecord->$field : $globalValue,
id => "set.$setID.${field}_id",
class => 'form-control w-auto'
. ($field eq 'open_date' ? ' datepicker-group' : ''),
class => 'form-control w-auto' . ($field eq 'open_date' ? ' datepicker-group' : ''),
placeholder => $isGateway
? ($isVersioned && $field ne 'reduced_scoring_date'
? maketext('Required')
Expand Down

0 comments on commit f70b0c9

Please sign in to comment.