Skip to content

Commit

Permalink
SV-27 Add standard instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
odeialba committed Oct 6, 2023
1 parent 77bdea4 commit 7a2c7e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lang/en/sortvoting.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
$string['completiondetail:submit'] = 'Submit vote';
$string['completionsubmit'] = 'Student must submit a vote to complete this activity';
$string['errorduplicatedposition'] = 'All positions must be unique.';
$string['instructions'] = 'Change the options below into the desired order, so your preferred choice is at the top and your least favourite choice is at the bottom.';
$string['modulename'] = 'Preference Sort Voting';
$string['modulenameplural'] = 'Preference Sort Votings';
$string['notenrolledsort'] = 'Sorry, only enrolled users are allowed to vote.';
Expand Down
5 changes: 4 additions & 1 deletion templates/sort_voting_form.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
}}
<input type="hidden" name="sortvotingid" value="{{sortvotingid}}" />

{{! Make this list drag and drop sortable. }}
<div class="mb-3">{{#str}}instructions, mod_sortvoting{{/str}}</div>

{{! This list is drag and drop sortable. }}
<ul id="sortvotinglist" class="fa-ul">
{{#options}}
<li class="d-flex card p-3 mb-2 {{^allowupdate}}bg-gray-100{{/allowupdate}} {{#allowupdate}}optionitem draggable{{/allowupdate}}" {{#allowupdate}}data-drag-type="move" draggable="true"{{/allowupdate}}>
Expand All @@ -67,6 +69,7 @@
</li>
{{/options}}
</ul>

{{#allowupdate}}
<button class="btn btn-primary" data-action="savevote" title="{{#str}} save {{/str}}">{{#str}} save {{/str}}</button>
{{#js}}
Expand Down

0 comments on commit 7a2c7e0

Please sign in to comment.