* Shows information on the currently selected user: name, username, email, etc * plus the details of any taken assessment or survey. SysAdmin users also have the ability * to edit personal details such as name, username, password, etc. * * @author Simon Wilkinson, Anthony Brown * @version 1.0 * @copyright Copyright (c) 2014 The University of Nottingham * @package */ require_once '../include/sysadmin_auth.inc'; require_once '../include/errors.inc'; require_once '../include/demo_replace.inc'; require_once '../classes/userutils.class.php'; $userID = check_var('userID', 'GET', true, false, true); $errors = false; $user_details = UserUtils::get_user_details($userID, $mysqli); if ($user_details === 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); } if (isset($_POST['submit']) and $_POST['username'] != $_POST['prev_username']) { // Check new username is not already used. Overwriting usernames could screw up other accounts. if (UserUtils::username_exists($_POST['username'], $mysqli)) { $errors = 'Username exists'; } } if (isset($_POST['submit']) and !$errors) { $cfg_web_root = $configObject->get('cfg_web_root'); if (!empty($_FILES['photofile']['name'])) { $filename = $_FILES['photofile']['name']; $explode = explode('.', $filename);
* Clear LTI links for a user - SysAdmin only. * * @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/userutils.class.php'; $userID = check_var('userID', 'POST', true, false, true); $user_list = explode(',', $userID); // We could be passed multiple user IDs. foreach ($user_list as $individual_userID) { if ($individual_userID != '') { $user_details = UserUtils::get_user_details($individual_userID, $mysqli); if ($user_details === 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); } } } foreach ($user_list as $individual_userID) { UserUtils::clear_lti_user($individual_userID, $mysqli); } $mysqli->close(); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
&mode=<?php echo $mode; ?> &module=<?php echo $_GET['module']; ?> '; }); }); </script> </head> <body> <?php $external_details = UserUtils::get_user_details($externalID, $mysqli); $to = $external_details['email']; if ($mode == 0) { $message = $string['message0']; $subject = sprintf($string['subject_msg0'], $configObject->get('cfg_company')); } elseif ($mode == 1) { $message = $string['message1']; $subject = sprintf($string['subject_msg1'], $configObject->get('cfg_company')); } else { $message = $string['message2']; $subject = sprintf($string['subject_msg2'], $configObject->get('cfg_company')); } $message = str_replace('$users_name', $userObject->get_first_first_name(), $message); $message = str_replace('$support_email', $support_email, $message); $message = str_replace('$rogo_url', $url, $message); $message = str_replace('$deadline', $display_deadline, $message);
$categories = array('Staff', 'Admin', 'SysAdmin'); foreach ($categories as $category) { if ($category == $page_details['roles']) { echo "<option value=\"{$category}\" selected>{$category}</option>\n"; } else { echo "<option value=\"{$category}\">{$category}</option>\n"; } } echo "</select>\n</td></tr></table>\n<br />\n"; echo "<textarea class=\"mceEditor\" id=\"edit1\" name=\"edit1\" style=\"width:100%; height:500px\">" . htmlspecialchars($page_details['body'], ENT_NOQUOTES) . "</textarea>\n"; // Check for lockout. $current_time = date('YmdHis'); $disabled = ''; if ($userObject->get_user_ID() != $page_details['checkout_authorID']) { if ($page_details['checkout_time'] != '' and $current_time - $page_details['checkout_time'] < 10000) { $editor = UserUtils::get_user_details($page_details['checkout_authorID'], $mysqli); $editor_name = $editor['title'] . ' ' . $editor['initials'] . ' ' . $editor['surname']; echo "<script>\n"; echo " alert('" . $string['entertitle'] . " {$editor_name}. " . $string['isinreadonly'] . "')"; echo "</script>\n"; $checkout_authorID = $page_details['checkout_authorID']; $disabled = ' disabled'; } else { // Set the lock to the current time/author. $help_system->set_edit_lock($edit_id); $checkout_authorID = $userObject->get_user_ID(); } } elseif ($disabled == '' and $userObject->get_user_ID() == $page_details['checkout_authorID']) { $checkout_authorID = $userObject->get_user_ID(); } ?>
if ($properties->get_deleted() != '') { ?> <div id="left-sidebar" class="sidebar"> </div> <div id="content"> <br /> <?php echo "<div style=\"position:absolute;left:230px;top:10px\"><img src=\"../artwork/exclamation_48.png\" width=\"48\" height=\"48\" /></div>\n"; echo "<h1 style=\"color:#C00000; margin-left:70px;font-size:160%\">" . $string['paperdeleted'] . "</h1>\n"; $deleted_parts = explode('[deleted', $properties->get_paper_title()); echo "<hr size=\"1\" align=\"left\" width=\"500\" style=\"height:1px;border:none;margin-left:70px;color:#C0C0C0;background-color:#C0C0C0\" />\n<p style=\"margin-top:10px; margin-left:70px\">" . sprintf($string['deleted_msg1'], $deleted_parts[0]) . "</p>\n\n<br />\n<ul style=\"margin-left:80px\">\n"; if ($properties->get_paper_ownerid() == $userObject->get_user_ID()) { echo "<li>" . $string['deleted_msg2'] . "</li>\n"; } else { $tmp_owner = $properties->get_paper_ownerid(); $owner_details = UserUtils::get_user_details($tmp_owner, $mysqli); echo "<li>" . sprintf($string['deleted_msg3'], $owner_details['email'], $owner_details['title'], $owner_details['surname']) . "</li>\n"; } echo "</ul>"; echo "</div>\n</body>\n</html>\n"; $mysqli->close(); exit; } // Log the hit in recent_papers. Paper_utils::log_hit($userObject->get_user_ID(), $paperID, $mysqli); $old_p_id = 0; $row_no = 0; $row_no2 = 0; $old_display_pos = -1; $temp_array = array(); $latex = 0;