當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserUtils::load_student_modules方法代碼示例

本文整理匯總了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";
開發者ID:vinod-co,項目名稱:centa,代碼行數:30,代碼來源:new_student_note.php


注:本文中的UserUtils::load_student_modules方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。