// So that we can exclude them later $approver_email = ''; $url = new moodle_url('/local/obu_application/mdl_approvals.php'); $heading = get_string('approvals', 'local_obu_application'); } $PAGE->set_url($url); $PAGE->set_pagelayout('standard'); $PAGE->set_context($context); $PAGE->set_title($heading); $PAGE->set_heading($heading); // The page contents echo $OUTPUT->header(); echo $OUTPUT->heading($heading); $process = new moodle_url('/local/obu_application/mdl_process.php'); $redirect = new moodle_url('/local/obu_application/mdl_redirect.php'); $approvals = get_approvals($approver_email); // get outstanding approval requests foreach ($approvals as $approval) { if ($approver_email != '' || $approval->approver != $approver->email) { $application = read_application($approval->application_id); get_application_status($USER->id, $application, $text, $button); // get the approval trail and the next action (from the user's perspective) echo '<h4><a href="' . $process . '?id=' . $application->id . '">' . $application->course_code . ' ' . $application->course_name . ' (' . $application->lastname . ' - HLS/' . $application->id . ')</a></h4>'; echo $text; if ($application->approval_level < 3) { // Can't redirect away from final HLS approval/processing echo '<p><a href="' . $redirect . '?id=' . $application->id . '">' . get_string('redirect_application', 'local_obu_application') . '</a></p>'; } } } echo $OUTPUT->footer();
require '../../config.php'; require_once './hide_moodle.php'; require_once './locallib.php'; // Try to prevent searching for sites that allow sign-up. if (!isset($CFG->additionalhtmlhead)) { $CFG->additionalhtmlhead = ''; } $CFG->additionalhtmlhead .= '<meta name="robots" content="noindex" />'; require_obu_login(); $process = new moodle_url('/local/obu_application/process.php'); $PAGE->set_url($CFG->httpswwwroot . '/local/obu_application/index.php'); $PAGE->set_title($CFG->pageheading . ': ' . get_string('index_page', 'local_obu_application')); echo $OUTPUT->header(); //echo '<audio autoplay><source src="https://brookes-apps.appspot.com/say.php?' . $USER->firstname . ', please select an option." type="audio/wav"></audio>'; // Display any outstanding approvals $approvals = get_approvals($USER->email); // get outstanding approval requests if ($approvals) { echo '<h2>' . get_string('your_approvals', 'local_obu_application') . '</h2>'; foreach ($approvals as $approval) { $application = read_application($approval->application_id); $application_title = $application->firstname . ' ' . $application->lastname . ' (Application Ref HLS/' . $application->id . ')'; echo '<h4><a href="' . $process . '?id=' . $application->id . '">' . $application_title . '</a></h4>'; get_application_status($USER->id, $application, $text, $button); // get the approval trail and the next action (from the user's perspective) echo $text; } } else { echo get_string('page_content', 'local_obu_application'); } // Display applications submitted