// no data selected for this UserNotices::display_notice($string['warning'], $string['ltinotconfigured'], '../artwork/access_denied.png', $title_color = '#C00000'); echo "\n</body>\n</html>\n"; exit; } else { //valid data list($c_internal_id, $upd) = $lti->lookup_lti_context(); $session = date_utils::get_current_academic_year(); if (is_null($c_internal_id)) { // $lti_i::invalid_module_code($c_internal_id, $data, 'no returned data'); } $data = $lti_i::module_code_translate($c_internal_id); foreach ($data as $v) { $returned_check = module_utils::get_full_details_by_name($v[1], $mysqli); if (!UserUtils::is_user_on_module_by_name($userObject->get_user_ID(), $v[1], $session, $mysqli) and $returned_check !== false and $lti_i::allow_module_self_reg($v)) { if ($returned_check['active'] == 1 and $returned_check['selfenroll'] == 1 and !UserUtils::is_user_on_module_by_name($userObject->get_user_ID(), $v[1], $session, $mysqli)) { // Insert new module enrollment UserUtils::add_student_to_module_by_name($userObject->get_user_ID(), $v[1], 1, $session, $mysqli); } } } $_SESSION['lti']['paperlink'] = $returned[0]; header("location: ../paper/user_index.php?id=" . $returned[0]); echo "Please click <a href='../paper/user_index.php?id=" . $returned[0] . ".>here</a> to continue"; exit; } } else { //staff if ($returned !== false) { // goto link $returned2 = $lti->lookup_lti_context();