<h4>' . getTxt('Users') . '</h4> </a> <ul style="list-style: none;" class="collapse" id="usermgmt">'; echo "<li class=\"add_user\"><a href='" . site_url('user/add') . "'>" . getTxt('AddUser') . "</a></li>"; echo "<li class=\"edit_user\"><a href='" . site_url('user/changepass') . "'>" . getTxt('ChangePassword') . "</a></li>"; echo "<li class=\"edit_user\"><a href='" . site_url('user/changeownpass') . "'>" . getTxt('ChangeYourPassword') . "</a></li>"; // > admin if (isAdmin()) { echo "<li class=\"change_authority\"><a href='" . site_url('user/edit') . "'>" . getTxt('ChangeAuthorityButton') . "</a></li>"; } // > teacher admin echo "<li class=\"remove_user\"><a href='" . site_url('user/delete') . "'>" . getTxt('RemoveUser') . "</a></li>"; echo "</ul>"; echo "</li>"; } if (isStudent() || isTeacher() || isAdmin()) { // student teacher echo '<li class="nav-header"> <a href="#" data-toggle="collapse" data-target="#dataMgmt"> <h4>' . getTxt('AddData') . '</h4> </a> <ul style="list-style: none;" class="collapse" id="dataMgmt">'; echo "<li class=\"add_single_value\"><a href='" . site_url('datapoint/addvalue') . "'>" . getTxt('AddSingleValue') . "</a></li>"; echo "<li class=\"add_multiple_value\"><a href='" . site_url('datapoint/addmultiplevalues') . "'>" . getTxt('AddMultipleValues') . "</a></li>"; echo "<li class=\"import_data\"><a href='" . site_url('datapoint/importfile') . "'>" . getTxt('ImportDataFiles') . "</a></li>"; echo "</ul>"; echo "</li>"; } echo "<li class=\"search\"><a href='" . site_url('sites/map') . "'>" . getTxt('SearchData') . "</a></li>"; echo "<li class=\"help\"><a href='" . site_url('home/help') . "'>" . getTxt('Help') . "</a></li>"; echo "<li class=\"search\"><a href='" . "/climate/services/" . "'>" . getTxt('WebServices') . "</a></li>"; if (isLoggedIn()) {
require 'gmail/autoload.php'; include "../config.php"; include "config.php"; define('APPLICATION_NAME', 'Gmail API Quickstart'); define('CLIENT_SECRET_PATH', 'client_secret.json'); define('SCOPES', implode(' ', array(Google_Service_Gmail::GMAIL_READONLY))); if (isset($_GET['action'])) { $action = $_GET['action']; } else { $action = "none"; } if (isset($_COOKIE['MoodleSession'])) { $userid = getMoodleIdFromSession($_COOKIE['MoodleSession']); //echo "User ID = $userid "; if (isStudent($userid)) { $userToken = getUserToken($userid); if (isset($userToken)) { printUnreadMessages($userToken); } else { if ($action == 'getToken') { getNewToken(); } else { echo "0"; } } } else { echo "null"; } } function printUnreadMessages($userToken)
$page['studentCourseAssignments'] = getStudentCourseAssignments($courseID); require_once 'header.php'; require_once 'student/assignlist.php'; } else { $page['title'] = "Faculty - Assignment List"; require_once 'header.php'; $courseID = $_GET['courseID']; $page['studentsNotEnrolled'] = getStudentsNotInCourse($courseID); $page['studentsEnrolled'] = getStudentsInCourse($courseID); $page['staffCourseAssignments'] = getStaffCourseAssignments($courseID); require_once 'staff/assignlist.php'; } require_once 'footer.php'; break; case "assignment": if (isStudent()) { $page['title'] = "Student - Assignment"; $assID = $_GET['assignmentID']; $page['studentAssSubmissions'] = getStudentAssignmentSubmissions($assID); require_once 'header.php'; require_once 'student/assignment.php'; } else { $page['title'] = "Faculty - Assignment"; require_once 'header.php'; $assID = $_GET['assID']; $page['staffStudentSubmissions'] = getStaffStudentSubmission($assID); require_once 'staff/assignment.php'; } require_once 'footer.php'; break; case "logout":
function isRegistrationOpen() { if (get_option('open_registration') == 0 || !isStudent(get_persondata('personID'))) { return ' style="display:none !important;"'; } }
"><?php echo _t('(STAF) - Staff'); ?> </a></li> <?php } ?> <?php } ?> <?php if ($nae !== '') { ?> <?php if (isStudent($nae[0]['personID']) && _he('access_student_screen')) { ?> <li data-jstree='{"icon":"glyphicon glyphicon-file"}' id="shtml_52"><a<?php echo $screen === 'spro' ? ' class="jstree-clicked"' : ''; ?> href="<?php echo get_base_url(); ?> stu/<?php echo _h($nae[0]['personID']); ?> /<?php echo bm(); ?> "><?php echo _t('(SPRO) - Stu. Profile');
while ($i < $size) { $q2 = $app->db->stu_rgn_cart(); $q2->stuID = get_persondata('personID'); $q2->courseSecID = $_POST['courseSecID'][$i]; $q2->deleteDate = $deleteDate; if ($q2->save()) { $app->flash('success_message', $flashNow->notice(200)); } else { $app->flash('error_message', $flashNow->notice(409)); } ++$i; redirect(get_base_url() . 'courses/cart' . '/'); } } $terms = _escape(get_option('open_terms')); if (function_exists('create_payment_plan') && isStudent(get_persondata('personID'))) { $sect = $app->db->course_sec()->setTableAlias('a')->select('a.courseSecID,a.courseSecCode,a.secShortTitle,a.dotw')->select('a.startTime,a.endTime,a.minCredit,a.termCode')->select('a.courseFee,a.labFee,a.materialFee,a.facID')->select('a.comment,a.courseSection,b.locationName,c.courseDesc')->_join('location', 'a.locationCode = b.locationCode', 'b')->_join('course', 'a.courseID = c.courseID', 'c')->_join('prog_crse', 'c.courseCode = d.crseCode', 'd')->_join('stu_program', 'd.progCode = e.acadProgCode', 'e')->where('e.stuID = ?', get_persondata('personID'))->_and_()->where('a.currStatus = "A"')->_and_()->where('a.webReg = "1"')->_and_()->where('a.termCode IN(' . $terms . ')'); } else { $sect = $app->db->course_sec()->setTableAlias('a')->select('a.courseSecID,a.courseSecCode,a.secShortTitle,a.dotw')->select('a.startTime,a.endTime,a.minCredit,a.termCode')->select('a.courseFee,a.labFee,a.materialFee,a.facID')->select('a.comment,a.courseSection,b.locationName,c.courseDesc')->_join('location', 'a.locationCode = b.locationCode', 'b')->_join('course', 'a.courseID = c.courseID', 'c')->where('a.currStatus = "A"')->_and_()->where('a.webReg = "1"')->_and_()->where('a.termCode IN(' . $terms . ')'); } $q = $sect->find(function ($data) { $array = []; foreach ($data as $d) { $array[] = $d; } return $array; }); $app->view->display('courses/index', ['title' => 'Search Courses', 'cssArray' => $css, 'jsArray' => $js, 'sect' => $q]); }); $app->get('/cart/', function () use($app, $css, $js) { $cart = $app->db->course_sec()->setTableAlias('a')->select('a.courseSecID,a.courseSecCode,a.courseSection,a.secShortTitle,a.dotw')->select('a.startTime,a.endTime,a.minCredit,a.termCode')->select('a.courseFee,a.labFee,a.materialFee,a.facID,a.comment,b.locationName')->_join('location', 'a.locationCode = b.locationCode', 'b')->_join('stu_rgn_cart', 'a.courseSecID = c.courseSecID', 'c')->where('c.stuID = ?', get_persondata('personID'));
/** * @package:SMS * @helper::whoIs(). * @Author:Techno Services */ function whoIs() { $page = 'dashboard'; if (isParent()) { $page = 'parents/parents-module'; } elseif (isStudent()) { $page = 'students/students-module'; } elseif (isTeacher()) { $page = 'teachers/teacher-module'; } return $page; }
// current directory // // // /*****************************************/ include "config.php"; include "../config.php"; // Clean the data, make sure it only contains possible session information if (preg_match('/^[a-z0-9]+$/', $_GET["session"])) { $session = $_GET["session"]; } else { $session = 0; } // ************************************************************ // Main Program Logic // ************************************************************ $moodleId = getMoodleIdFromSession($session); if (isStudent($moodleId)) { if (inCurrentCourse($moodleId) == 1) { $studentNumber = getStudentNumber($moodleId); $results = checkSurveyStatus($studentNumber); } else { $results = "0"; } } else { $results = "0"; } echo $results; // ************************************************************** // Supporting Functions // ************************************************************** function getStudentNumber($moodleId) {
public function delete() { if (isStudent()) { $this->kickOut(); } if ($_POST) { $this->form_validation->set_rules('username', 'Username', 'trim|required|xss_clean'); } if ($this->form_validation->run() == FALSE) { $errors = validation_errors(); if (!empty($errors)) { addError($errors); } } else { $uname = $this->input->post('username'); $result = $this->users->removeUser($uname); if ($result) { addSuccess(getTxt('CongratsRemoved') . " " . $this->input->post('username')); } else { addError(getTxt('ProcessingError')); } } //List of CSS to pass to this view $data = $this->StyleData; $data['option_block'] = $this->getUserList(); $this->load->view('users/delete', $data); }