* @subpackage classes * @copyright 2012 Niranjan <*****@*****.**> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot . '/local/lib.php'); require_once($CFG->dirroot . '/local/clclasses/lib.php'); global $CFG; $systemcontext = context_system::instance(); $facid = optional_param('facid', 0, PARAM_INT); $proid = optional_param('proid', 0, PARAM_INT); $page = optional_param('page', 0, PARAM_INT); $PAGE->set_pagelayout('admin'); $PAGE->set_context($systemcontext); require_login(); $semclass = new schoolclasses(); $hierarchy = new hierarchy(); /* * Niranjan-check for capabily check * Here I am checking if a user having the manage capabily is there or not. * If capability is not there I am redirecting to the error.php page. */ if (!has_capability('local/clclasses:view', $systemcontext) && !is_siteadmin()) { $returnurl = new moodle_url('/local/error.php'); redirect($returnurl); } $PAGE->set_url('/local/clclasses/index.php'); $PAGE->set_heading($SITE->fullname); $PAGE->navbar->add(get_string('manageclasses', 'local_clclasses'), new moodle_url('/local/clclasses/index.php')); $PAGE->navbar->add(get_string('view', 'local_clclasses')); echo $OUTPUT->header();
*/ require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot . '/local/lib.php'); require_once($CFG->dirroot . '/local/clclasses/lib.php'); global $CFG; $systemcontext = context_system::instance(); $PAGE->set_pagelayout('admin'); /* ---check the context level of the user and check weather the user is login to the system or not--- */ $PAGE->set_context($systemcontext); require_login(); if (!has_capability('local/clclasses:manage', $systemcontext) && !is_siteadmin()) { $returnurl = new moodle_url('/local/error.php'); redirect($returnurl); } $PAGE->set_url('/local/clclasses/index.php'); $clssinfo = new schoolclasses(); $hierarchy = new hierarchy(); /* ---Header and the navigation bar--- */ $PAGE->set_heading($SITE->fullname); $PAGE->navbar->add(get_string('manageclasses', 'local_clclasses')); $PAGE->navbar->add(get_string('info', 'local_clclasses')); $PAGE->requires->css('/local/clclasses/css/style.css'); echo $OUTPUT->header(); $currenttab = "info"; echo $OUTPUT->heading(get_string('manageclasses', 'local_clclasses')); $clssinfo->print_classestabs($currenttab); /* ---Moodle 2.2 and onwards--- */ if (isset($CFG->allowframembedding) and !$CFG->allowframembedding) { echo $OUTPUT->box(get_string('help_info', 'local_clclasses')); } $content = get_string('info_help', 'local_clclasses');
<?php require_once(dirname(__FILE__) . '/../../config.php'); global $CFG, $USER, $DB; require_once($CFG->dirroot . '/local/clclasses/lib.php'); require_once($CFG->dirroot . '/local/lib.php'); require_once($CFG->dirroot . '/lib/enrollib.php'); require_once($CFG->dirroot . '/local/clclasses/enroluser_form.php'); $hierarchy = new hierarchy(); $conf = new object(); $semclass = new schoolclasses(); $id = optional_param('id', 0, PARAM_INT); $semid = optional_param('semid', 0, PARAM_INT); $activesemesterid = optional_param('activesemid', 0, PARAM_INT); $systemcontext = context_system::instance(); $PAGE->set_pagelayout('admin'); $PAGE->set_context($systemcontext); $PAGE->set_url('/local/clclasses/enroluser.php'); $PAGE->set_heading(get_string('pluginname', 'local_clclasses')); $PAGE->navbar->add(get_string('manageclasses', 'local_clclasses'), new moodle_url('/local/clclasses/index.php')); $PAGE->navbar->add(get_string('enrol_user', 'local_clclasses')); echo $OUTPUT->header(); // -------------Edited by hema---------------------------------------- $enrolluser_cap = array('local/clclasses:manage', 'local/clclasses:enrolluser'); if (!has_any_capability($enrolluser_cap, $systemcontext)) { print_error('You dont have permissions'); } //
* @subpackage classes * @copyright 2013 Vinodkumar <*****@*****.**> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot . '/local/lib.php'); require_once($CFG->dirroot . '/local/clclasses/lib.php'); $mode = optional_param('mode', 'current', PARAM_RAW); global $CFG; $systemcontext = context_system::instance(); /* ---get the admin layout--- */ $PAGE->set_pagelayout('admin'); /* ---check the context level of the user and check weather the user is login to the system or not--- */ $PAGE->set_context($systemcontext); require_login(); $semclass = new schoolclasses(); $PAGE->set_url('/local/clclasses/index.php'); $roleid = $DB->get_field('role_assignments', 'roleid', array('userid' => $USER->id, 'contextid' => $systemcontext->id)); $role = $DB->get_record('role', array('id' => $roleid)); if ($role->shortname != 'instructor') { print_error('You dont have permissions'); } /* ---Header and the navigation bar--- */ $PAGE->set_heading($SITE->fullname); $title = get_string('mycourses', 'local_clclasses'); $PAGE->navbar->add($title); echo $OUTPUT->header(); /* ---Heading of the page--- */ echo $OUTPUT->heading(get_string('mycourses', 'local_clclasses')); if (isset($CFG->allowframembedding) and !$CFG->allowframembedding) { echo $OUTPUT->box(get_string('instviewpage', 'local_clclasses'));
} $DB->set_field('local_clclasses', 'visible', $disabled, array('id' => $id)); $options = array('style' => 'notifysuccess'); $hierarchy->set_confirmation($message, $returnurl, $options); } $heading = ($id > 0) ? get_string('editclasses', 'local_clclasses') : get_string('createclasses', 'local_clclasses'); $PAGE->navbar->add(get_string('manageclasses', 'local_clclasses'), new moodle_url('/local/clclasses/index.php', array('id' => $id))); $PAGE->navbar->add($heading); $PAGE->set_title($strheading); $editform = new createclass_form(null, array('id' => $id)); // Task code : T1.6 - Assigning instructor to class if (isset($tool->instructor)) $tool->instructor = explode(',', $tool->instructor); $editform->set_data($tool); $clob = new schoolclasses(); if ($editform->is_cancelled()) { redirect($returnurl); } else if ($data = $editform->get_data()) { $data->description = $data->description['text']; if ($data->id > 0) { $_REQUEST['newcobaltcourseid1']; echo'<br>'; $_REQUEST['newonlinecourseid1']; echo'<br>'; if ($_REQUEST['newcobaltcourseid1'] != null) { $data->cobaltcourseid = $_REQUEST['newcobaltcourseid1']; } if ($_REQUEST['newonlinecourseid1'] != null) { $data->onlinecourseid = $_REQUEST['newonlinecourseid1']; }
require_once($CFG->dirroot . '/local/clclasses/lib.php'); require_once($CFG->dirroot . '/local/clclasses/classes_form.php'); require_once($CFG->dirroot . '/local/lib.php'); require_once($CFG->dirroot . '/local/classroomresources/lib.php'); $id = optional_param('id', -1, PARAM_INT); // user id; -1 if creating new tool $delete = optional_param('delete', 0, PARAM_BOOL); // $unassign = optional_param('unassign', 0, PARAM_BOOL); $confirm = optional_param('confirm', 0, PARAM_BOOL); // $hide = optional_param('hide', 0, PARAM_INT); // $show = optional_param('show', 0, PARAM_INT); // $moduleid = optional_param('moduleid', 0, PARAM_INT); $page = optional_param('page', 0, PARAM_INT); // $proid = optional_param('proid', 0, PARAM_INT); require_login(); $hierarchy = new hierarchy(); $semclass = new schoolclasses(); $systemcontext = context_system::instance(); if (!has_capability('local/collegestructure:manage', $systemcontext)) { $returnurl = new moodle_url('/local/error.php'); redirect($returnurl); } /* ---checking the course exists or not--- */ if ($id > 0) { if (!($tool = $DB->get_record('local_clclasses', array('id' => $id)))) { print_error('invalidtoolid', 'local_clclasses'); } else { $tool->departmentid = $semclass->get_selecteddepartment($id); $ins = array(); $ins[] = $semclass->get_selectedinstructor($id); $tool->instructorid = $ins[0]; $tool->departmentinid = $semclass->get_selecteddepartment($id);
*/ require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot . '/local/lib.php'); require_once($CFG->dirroot . '/local/courseregistration/lib.php'); require_once($CFG->dirroot . '/local/clclasses/lib.php'); $id = optional_param('id', 0, PARAM_INT); $inst = optional_param('inst', 0, PARAM_INT); global $CFG; $systemcontext = context_system::instance(); //get the admin layout $PAGE->set_pagelayout('admin'); //check the context level of the user and check weather the user is login to the system or not $PAGE->set_context($systemcontext); $semclass = new schoolclasses(); if ($CFG->forcelogin) { require_login(); } else { user_accesstime_log(); } $PAGE->set_url('/local/clclasses/index.php'); if (!($classes = $DB->get_record('local_clclasses', array('id' => $id)))) { print_error('invalidclassid', 'local_clclasses'); } //Header and the navigation bar $PAGE->set_heading($SITE->fullname); if ($inst) { $PAGE->navbar->add(get_string('mycourses', 'local_clclasses'), "/local/clclasses/instview.php", get_string('view', 'local_clclasses')); } else if (has_capability('local/clclasses:manage', $systemcontext)) {
require_once($CFG->dirroot . '/local/clclasses/lib.php'); require_once($CFG->dirroot . '/local/lib.php'); require_once($CFG->dirroot . '/local/classroomresources/lib.php'); require_once($CFG->dirroot . '/local/clclasses/createclass_form.php'); require_once($CFG->dirroot . '/lib/enrollib.php'); $id = optional_param('id', -1, PARAM_INT); $deptid = optional_param('deptid', 0, PARAM_INT); $schoid = optional_param('schoid', 0, PARAM_INT); // $semid = optional_param('semid', 0, PARAM_INT); // $courseid = optional_param('courseid', 0, PARAM_INT); $classid = optional_param('classid', 0, PARAM_INT); // $systemcontext = context_system::instance(); $PAGE->requires->css('/local/clclasses/css/style.css'); $PAGE->set_pagelayout('admin'); $PAGE->set_context($systemcontext); $semclass = new schoolclasses(); $hierarchy = new hierarchy(); require_login(); if ($CFG->forcelogin) { require_login(); } else { user_accesstime_log(); } // -------------Edited by hema---------------------------------------- $assigninstructor_cap = array('local/clclasses:manage', 'local/clclasses:assigninstructor', 'local/classroomresources:manage'); if (!has_any_capability($assigninstructor_cap, $systemcontext)) { print_error('You dont have permissions'); } // if ($id > 0) { if (!($tool = $DB->get_record('local_scheduleclass', array('id' => $id)))) {
* @copyright 2013 Niranjan <*****@*****.**> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot . '/local/lib.php'); require_once($CFG->dirroot . '/local/clclasses/lib.php'); $id = optional_param('id', 0, PARAM_INT); $inst = optional_param('inst', 0, PARAM_INT); $delete = optional_param('delete', 0, PARAM_INT); $examid = optional_param('examid', 0, PARAM_INT); global $CFG; $currentjs = '/local/clclasses/js/filter.js'; $PAGE->requires->js($currentjs); $systemcontext = context_system::instance(); $PAGE->set_pagelayout('admin'); $semclass = new schoolclasses(); /* ---check the context level of the user and check weather the user is login to the system or not--- */ $PAGE->set_context($systemcontext); if ($CFG->forcelogin) { require_login(); } else { user_accesstime_log(); } $PAGE->set_url('/local/clclasses/index.php'); $PAGE->set_heading($SITE->fullname); if ($inst) { $PAGE->navbar->add(get_string('mycourses', 'local_clclasses'), "/local/clclasses/instview.php", get_string('view', 'local_clclasses')); } else { $PAGE->navbar->add(get_string('manageclasses', 'local_clclasses'), "/local/clclasses/index.php", get_string('view', 'local_clclasses')); } $PAGE->navbar->add(get_string('classcriteria', 'local_clclasses'));
if ($classsskipped) { echo $OUTPUT->box_start('generalbox'); if ($classsskipped == 1) echo '<h4> Class skipped because record with that name is already exists.</h4>'; else echo '<h4>' . $classsskipped . ' Classes skipped because records with those names are already exist.</h4>'; echo $OUTPUT->box_end(); } echo '<div style="margin-left:35%;"><a href="upload.php"><button>Continue</button></a></div>'; echo $OUTPUT->footer(); die; } /* ---Print the header--- */ echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('uploadclassspreview', 'local_clclasses')); $currenttab = 'upload'; $ob = new schoolclasses(); $ob->print_classestabs($currenttab); /* ---Print the form if valid values are available--- */ $noerror = true; if ($noerror) { $mform2->display(); } echo $OUTPUT->footer(); die;
require_once(dirname(__FILE__) . '/../../config.php'); require_once($CFG->dirroot . '/local/clclasses/lib.php'); require_once($CFG->dirroot . '/local/clclasses/duplicate_form.php'); require_once($CFG->dirroot . '/local/lib.php'); require_once($CFG->dirroot . '/local/classroomresources/lib.php'); global $CFG; $id = optional_param('id', -1, PARAM_INT); $page = optional_param('page', 0, PARAM_INT); $systemcontext = context_system::instance(); $PAGE->set_context($systemcontext); $PAGE->set_url('/local/clclasses/index.php'); $PAGE->set_heading($SITE->fullname); $PAGE->navbar->add(get_string('manageclasses', 'local_clclasses'), new moodle_url('/local/clclasses/index.php')); $PAGE->navbar->add(get_string('duplicate', 'local_clclasses')); $hierarchy = new hierarchy(); $semclass = new schoolclasses(); $tool = $DB->get_record('local_clclasses', array('id' => $id)); $tool->departmentid = $semclass->get_selecteddepartment($id); $tool->schoolid = $DB->get_field('local_school', 'fullname', array('id' => $tool->schoolid)); $tool->semesterid = $DB->get_field('local_semester', 'fullname', array('id' => $tool->semesterid)); $tool->departmentid = $DB->get_field('local_department', 'fullname', array('id' => $tool->departmentid)); $tool->cobaltcourseid = $DB->get_field('local_cobaltcourses', 'fullname', array('id' => $tool->cobaltcourseid)); $tool->shortname = ''; if ($tool->online == 1) $tool->online = get_string('online', 'local_clclasses'); else $tool->online = get_string('offline', 'local_clclasses'); if ($tool->type == 1) $tool->type = get_string('clsmode_1', 'local_clclasses'); else $tool->type = get_string('clsmode_2', 'local_clclasses');