@ -169,7 +169,7 @@ header('Pragma: no-cache');
$browser_display_title = 'Documents - '.Security::remove_XSS($_GET['cidReq']).' - '.$file;
// Only admins get to see the "no frames" link in pageheader.php, so students get a header that's not so high
$frameheight = 135;
if ($is_courseAdmin) {
if (api_is_course_admin()) {
$frameheight = 165;
}
@ -110,8 +110,10 @@ if (isset($_REQUEST['convertAnswer'])) {
Session::write('objQuestion', $objQuestion);
$objAnswer = Session::read('objAnswer');
$_course = api_get_course_info();
// document path
$documentPath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
// picture path
@ -1432,6 +1432,10 @@ function _api_format_user($user, $add_password = false, $loadAvatars = true)
{
$result = [];
if (!isset($user['user_id'])) {
return [];
$result['firstname'] = null;
$result['lastname'] = null;