本文整理匯總了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";