Exemplo n.º 1
0
}
if (isset($_GET['userid'])) {
    $userid = $_GET['userid'];
} else {
    $userid = '';
}
if (isset($_GET['keyword'])) {
    $keyword = $_GET['keyword'];
} else {
    $keyword = '';
}
if (isset($_GET['module'])) {
    $module = $_GET['module'];
    if ($module != '0') {
        if (!isset($module_details)) {
            $module_details = module_utils::get_full_details_by_ID($module, $mysqli);
        }
        $module_code = $module_details['moduleid'];
        if (!$module_code) {
            $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email'));
            $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true);
        }
    } else {
        $module_code = 'Unassigned';
    }
} else {
    $module = '';
}
$qbank = new QuestionBank($module, $module_code, $string, $notice, $mysqli);
?>
<!DOCTYPE html>
Exemplo n.º 2
0
//
// You should have received a copy of the GNU General Public License
// along with Rogō.  If not, see <http://www.gnu.org/licenses/>.
/**
*
* @author Simon Wilkinson
* @version 1.0
* @copyright Copyright (c) 2014 The University of Nottingham
* @package
*/
require '../include/sysadmin_auth.inc';
require_once '../include/errors.inc';
require_once '../classes/moduleutils.class.php';
require_once '../classes/logger.class.php';
check_var('moduleid', 'GET', true, false, false);
$module = module_utils::get_full_details_by_ID($_GET['moduleid'], $mysqli);
if ($module === false) {
    $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email'));
    $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true);
}
$moduleid_in_use = false;
if (isset($_POST['submit']) and $_POST['modulecode'] != $_POST['old_modulecode']) {
    // Check for unique moduleid
    $new_modulecode = trim($_POST['modulecode']);
    $moduleid_in_use = module_utils::module_exists($new_modulecode, $mysqli);
}
if (isset($_POST['submit']) and $moduleid_in_use == false) {
    if (isset($_POST['active'])) {
        $module['active'] = 1;
    } else {
        $module['active'] = 0;
Exemplo n.º 3
0
 /**
  * Enrole the student on a module.
  *
  * @param $idMod moduleID of module
  * @param $attempt
  * @param $session session of module
  * @param int $auto_update if system add
  *
  * @return bool return true if successful.
  */
 public function add_student_to_module($idMod, $attempt, $session, $auto_update = 0)
 {
     // need to check its a self reg module
     if (module_utils::get_full_details_by_ID($idMod, $this->db) === false) {
         return false;
     }
     if (UserUtils::is_user_on_module($this, $idMod, $session, $this->db)) {
         //don't add a user to a module multiple times
         return true;
     }
     $return = UserUtils::add_student_to_module($this->get_user_ID(), $idMod, $attempt, $session, $auto_update);
     $this->load_student_modules();
     return $return;
 }