当前位置: 首页>>代码示例>>PHP>>正文


PHP Dashboard::fetchUpcomingExams方法代码示例

本文整理汇总了PHP中Dashboard::fetchUpcomingExams方法的典型用法代码示例。如果您正苦于以下问题:PHP Dashboard::fetchUpcomingExams方法的具体用法?PHP Dashboard::fetchUpcomingExams怎么用?PHP Dashboard::fetchUpcomingExams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dashboard的用法示例。


在下文中一共展示了Dashboard::fetchUpcomingExams方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unserialize

if (\Ventus\Utilities\I18n\Translate::isAllowedLanguage($SESSION->corr_lang)) {
    $l10n->setLanguage($SESSION->corr_lang);
    \Locale::setDefault($SESSION->corr_lang);
}
$l10n->addResource(FS_L10N . '/header-external.json');
//============================================================================================
// Load the page requested by the user
//============================================================================================
$this_page = "erequest";
if (!isset($_GET['page'])) {
    $l10n->addResource(__DIR__ . '/l10n/header.json');
    $l10n->addResource(__DIR__ . '/l10n/exam-requests.json');
    //Exams within a certain range have separate deadlines
    $blackout_dates = unserialize(PROFESSOR_NOE_SUBMISSION_BLACKOUT);
    $count_pending_follow_ups = $dashboard->fetchCountPendingFollowUps($SESSION->student_num);
    $upcoming_exams_access_service = $dashboard->fetchUpcomingExams($SESSION->student_num);
    if (!empty($upcoming_exams_access_service)) {
        foreach ($upcoming_exams_access_service as &$ueas) {
            $ueas['dropped'] = $model->determineDropped($SESSION->student_num, $ueas['course_code'], $ueas['course_section'], $ueas['session']);
        }
        unset($ueas);
    }
    $past_exams_access_service = $model->fetchPastExamsAtAccessService($SESSION->student_num);
    if (!empty($past_exams_access_service)) {
        foreach ($past_exams_access_service as &$ueas) {
            $ueas['dropped'] = $model->determineDropped($SESSION->student_num, $ueas['course_code'], $ueas['course_section'], $ueas['session']);
        }
        unset($ueas);
    }
    $upcoming_exams_in_class = $model->fetchUpcomingExamsInClass($SESSION->student_num);
    //For each of the exams the student has explicity denied, check if the denial action is reversible or not
开发者ID:hughnguy,项目名称:php,代码行数:31,代码来源:exam-requests.php

示例2: Dashboard

$model = new Dashboard($dbo);
$profile = new StudentProfile($dbo);
$exams = new ExamRequests($dbo);
if (\Ventus\Utilities\I18n\Translate::isAllowedLanguage($SESSION->corr_lang)) {
    $l10n->setLanguage($SESSION->corr_lang);
    \Locale::setDefault($SESSION->corr_lang);
}
$l10n->addResource(FS_L10N . '/header-external.json');
//============================================================================================
// Load the page requested by the user
//============================================================================================
$this_page = "dashboard";
if (!isset($_GET['page'])) {
    $count_pending_follow_ups = $model->fetchCountPendingFollowUps($SESSION->student_num);
    $count_upcoming_appointments = $model->fetchCountUpcomingAppointments($SESSION->student_num);
    $upcoming_exams = $model->fetchUpcomingExams($SESSION->student_num);
    foreach ($upcoming_exams as &$ueas) {
        $ueas['dropped'] = $exams->determineDropped($SESSION->student_num, $ueas['course_code'], $ueas['course_section'], $ueas['session'], $ueas['teach_method']);
    }
    unset($ueas);
    $upcoming_appointments = $model->fetchUpcomingAppointments($SESSION->student_num);
    $count_exams_awaiting_response = 0;
    $semester = \Ventus\Utilities\Functions::fetchSemester();
    //Exams within a certain range have separate deadlines
    $blackout_dates = unserialize(PROFESSOR_NOE_SUBMISSION_BLACKOUT);
    $student_courses = $profile->fetchStudentAllCoursesNeedingConfirmation($SESSION->student_num);
    foreach ($student_courses as $sc) {
        //For each course that a student is registered in, find the NOE for which the students can still respond
        $exams_awaiting_response_for_course = $exams->fetchExamsAwaitingResponse($SESSION->student_num, $sc['code'], $sc['section'], $sc['session'], $sc['teaching_method']);
        if (!empty($exams_awaiting_response_for_course)) {
            $numberOfExams = sizeof($exams_awaiting_response_for_course);
开发者ID:hughnguy,项目名称:php,代码行数:31,代码来源:dashboard.php


注:本文中的Dashboard::fetchUpcomingExams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。