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


PHP Requests::getExamRequestsInRange方法代码示例

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


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

示例1: elseif

    $startDate = $startDate->format('Y-m-d');
    $endDate = $endDate->format('Y-m-d');
    $log = $assignments->getLog($startDate, $endDate);
    $l10n->addResource(__DIR__ . '/l10n/seat-assignments.json');
    $l10n->localizeArray($log, 'comment');
    $viewFile = 'views/seat-assignments.php';
} elseif ($_GET['page'] === 'execute-script') {
    if ($_POST['type'] === 'reassign') {
        $assignments->unassignExamsSeatsInRange($_POST['start'], $_POST['end']);
    }
    //retrieve presorted and prioritized lists of exams and seats and hours of operation
    $maxAccommodationWeight = $assignments->getMaxAccommodationPriorityValue();
    $buckets = $assignments->getAndSortData($_POST['start'], $_POST['end'], $maxAccommodationWeight);
    $seats = $assignments->getSeats($maxAccommodationWeight);
    // initialize values used in statistics
    $totalExamsInRange = count($model->getExamRequestsInRange($_POST['start'], $_POST['end']));
    $nrOfExamsInBucket = 0;
    $examsScheduled = 0;
    $seatsAssigned = 0;
    if (!empty($buckets)) {
        //exams have been sorted based on priority and placed into buckets reprsenting exan dates
        foreach ($buckets as $dateBucket) {
            //iterate through each exam on a particular day
            foreach ($dateBucket as $exam) {
                $nrOfExamsInBucket++;
                //reinitalize flags for each bucket
                $hasConflicts = false;
                $noAccommodations = false;
                $found = false;
                //iterate through each active seat and check whether to seat is eligible
                foreach ($seats as $seat) {
开发者ID:hughnguy,项目名称:php,代码行数:31,代码来源:seat-assignments.php

示例2: unserialize

    $thisPage = "confirmed-requests";
    $default_date_range = unserialize(EXAMS_AND_PROCTOR_DEFAULT_DATE_FILTER_RANGE);
    if (!empty($_GET['start']) && !empty($_GET['end'])) {
        $startDate = \DateTime::createFromFormat('Y-m-d', urldecode($_GET['start']));
        $endDate = \DateTime::createFromFormat('Y-m-d', urldecode($_GET['end']));
    }
    if (!$startDate) {
        $startDate = new \DateTime($default_date_range['start']);
    }
    if (!$endDate) {
        $endDate = new \DateTime($default_date_range['end']);
    }
    $startDate = $startDate->format('Y-m-d');
    $endDate = $endDate->format('Y-m-d');
    //get all exam requests
    $allRequests = $model->getExamRequestsInRange($startDate, $endDate);
    $buildings = $seatManagement->getAllBuildings();
    foreach ($allRequests as &$req) {
        $req["dropped"] = $model->determineDropped($req);
        $req['proctor_status'] = \Ventus\Proctor\Proctor::determineStatus(array("is_cancelled" => $req['is_cancelled'], "proctor_initiated" => $req['proctor_initiated'], "official_evaluation_starttime" => \DateTime::createFromFormat(DATETIME_MYSQL, $req['official_evaluation_starttime']), "official_evaluation_endtime" => \DateTime::createFromFormat(DATETIME_MYSQL, $req['official_evaluation_endtime']), "actual_evaluation_starttime" => \DateTime::createFromFormat(DATETIME_MYSQL, $req['actual_evaluation_starttime']), "actual_evaluation_endtime" => \DateTime::createFromFormat(DATETIME_MYSQL, $req['actual_evaluation_endtime'])));
    }
    unset($req);
    $l10n->addResource(__DIR__ . '/l10n/confirmed-requests.json');
    $l10n->localizeArray($allRequests, 'accommodations');
    $viewFile = 'views/confirmed-requests.php';
} else {
    if ($_GET['page'] === "fetch-request-details") {
        //gather request and accommodation data
        $request = $model->getExamRequestById($_POST['request_id']);
        $examAccs = $model->getExamAccommodationsById($_POST['request_id']);
        $studentAccs = $model->getAllStudentActiveExamAndTranscriptionAccommodations($_POST['student_id'], $_POST['exam_date'], $request[0]['course_code'], $request[0]['course_section'], $request[0]['session']);
开发者ID:hughnguy,项目名称:php,代码行数:31,代码来源:confirmed-requests.php


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