コード例 #1
0
ファイル: all.php プロジェクト: hughnguy/php
?>
</th>
                        <th scope="col"><?php 
$l10n->_e('colHeaderActualEnd');
?>
</th>
                        <th scope="col" style="width:21%;"><?php 
$l10n->_e('colHeaderStatusOptions');
?>
</th>
                    </tr>
                </thead>
                <tbody>
                    <?php 
foreach ($data as $r) {
    $r['meta'] = \Ventus\Proctor\Proctor::determineStatus($r);
    echo '<tr><td>' . (is_null($r['first_name']) ? $l10n->__('unregisteredStudent') : $r['first_name'] . ' ' . $r['last_name']) . ' (' . $r['student_num'] . ')' . '</td>
                                  <td>' . $r['course_code'] . ' ' . $r['course_section'] . ' ' . $r['teach_method'] . '</td>
                                  <td>' . $r['professor'] . '</td>
                                  <td>' . (is_null($r['assigned_seat_id']) ? $l10n->__('seatUnassigned') : $r['room_number'] . ' | ' . $l10n->__('seat') . ' ' . $r['number']) . '</td>
                                  <td>' . $l10nDate->format($r['official_evaluation_starttime'], 'day_date_time') . '</td>
                                  <td>' . $l10nDate->format($r['official_evaluation_endtime'], 'time') . '</td>
                                  <td>' . (!$r['actual_evaluation_starttime'] ? 'N/A' : $l10nDate->format($r['actual_evaluation_starttime'], 'day_date_time')) . '</td>
                                  <td>' . (!$r['actual_evaluation_endtime'] ? 'N/A' : $l10nDate->format($r['actual_evaluation_endtime'], 'time')) . '</td>
                                  <td>' . ($r['meta']->img ? '<span data-ventus-icon="&#x51;" aria-hidden="true" title="' . $l10n->__("clockTooltip", $antiXSS::HTML_ATTR) . '" rel="tooltip"></span>' : '') . '<div class="ticket ' . $r['meta']->ticket . '">' . $l10n->__('status-' . $r['meta']->status) . '</div>' . '<br><a href="index.php?page=exam&amp;reqID=' . $r['request_id'] . '" class="btn-go-to-event btn-icon btn-maroon btn-arrow-right" title="' . $l10n->__("gotoEventTooltip") . '" rel="tooltip"><span></span>' . $l10n->__("gotoEventBtn") . '</a>' . '</td>
                              </tr>';
}
?>
                </tbody>
            </table>
            </div>
コード例 #2
0
ファイル: confirmed-requests.php プロジェクト: hughnguy/php
        $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']);
        if (!empty($studentAccs)) {
            $studentAccs = array_values($studentAccs);
        }
        $l10n->addResource(__DIR__ . '/l10n/confirmed-requests.json');