本文整理汇总了PHP中UserUtils::load_student_modules方法的典型用法代码示例。如果您正苦于以下问题:PHP UserUtils::load_student_modules方法的具体用法?PHP UserUtils::load_student_modules怎么用?PHP UserUtils::load_student_modules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserUtils
的用法示例。
在下文中一共展示了UserUtils::load_student_modules方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<body>
<form action="<?php
echo $_SERVER['PHP_SELF'];
?>
" method="post" name="theform" id="theform">
<?php
$disabled = '';
$note_details = array('note_id' => 0, 'note' => '');
$student_details = UserUtils::get_user_details($userID, $mysqli);
if (isset($_GET['paperID'])) {
echo "<input type=\"hidden\" name=\"paperID\" value=\"" . $_GET['paperID'] . "\" />\n";
$note_details = StudentNotes::get_note($_GET['paperID'], $userID, $mysqli);
echo '<strong>' . $student_details['title'] . ' ' . $student_details['surname'] . ', ' . $student_details['initials'] . '</strong><br />';
} else {
$student_modules = UserUtils::load_student_modules($userID, $mysqli);
$current_year = date_utils::get_current_academic_year();
$module_IDs = array();
if (isset($student_modules[$current_year])) {
foreach ($student_modules[$current_year] as $moduleID => $module_code) {
$module_IDs[] = $moduleID;
}
}
echo $string['papername'] . " <select name=\"paperID\" id=\"paperID\" required>\n<option value=\"\"></option>\n";
if (count($module_IDs) > 0) {
// Look up summative papers that have been live in the last 28 days.
$result = $mysqli->prepare("SELECT DISTINCT properties.property_id, paper_title FROM properties, properties_modules WHERE properties.property_id = properties_modules.property_id AND idMod IN (" . implode(',', $module_IDs) . ") AND paper_type = '2' AND end_date > DATE_SUB(NOW(), INTERVAL 28 DAY) AND deleted IS NULL ORDER BY paper_title");
$result->execute();
$result->bind_result($property_id, $paper_title);
while ($result->fetch()) {
echo "<option value=\"{$property_id}\">{$paper_title}</option>\n";