This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% 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 --%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%-- Main file --%> | |
<% loop $Students %> | |
<% loop $Assessements %> <%-- 'Assessment' --%> | |
<% loop $Up.Up.Subjects %> | |
<%-- I want to check if ($Assessment.SubjectID == $ID) --%> | |
<% end_loop %> | |
<% include AssessmentSubjectCheck AssessmentSubjectID=$SubjectID, $Subjects=$Up.Up.Subjects %> <%-- This is how we've changed scope to do that above need, see below for the include --%> | |
<% end_loop %> | |
<% end_loop %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class CatalogPageAdmin - Code submitted by stevie-mayhew | |
*/ | |
class CatalogPageAdmin extends ModelAdmin { | |
/** | |
* @config | |
* @var string | |
*/ | |
private static $menu_icon = 'silverstripe-catalogmanager/images/catalog.png'; |