Skip to content

Instantly share code, notes, and snippets.

@stevie-mayhew
Created February 11, 2016 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevie-mayhew/0d2b830302848a79e479 to your computer and use it in GitHub Desktop.
Save stevie-mayhew/0d2b830302848a79e479 to your computer and use it in GitHub Desktop.
<% loop $Subjects %>
<option value="$ID" <% if $ID == $Up.AssessmentSubjectID %> selected<% end_if %>>$Title</option>
<% end_loop %>
<%-- This has been included to change the scope of the elements so that we can access AssessmentSubjectID easily and we are tired. @todo better code --%>
<% loop $Subjects %>
<% if $Assessments.Count != 0 %>
<% loop $Assessments %>
<select id="Assessment-{$ID}"
name="Assessment-{$ID}"
class="form-control paper-edit-subject-id">
<% include AssessmentSubjectOptions Subjects=$Up.Up.Subjects, AssessmentSubjectID=$SubjectID %>
</select>
<% end_loop %>
<% end_if %>
<% end_loop %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment