[svn r12215] Added param to api_not_allowed(). Default is as before (doesn't print headers). If param set to true, headers are considered already sent (redirect is impossible)
Display :: display_error_message("<p>Either you are not allowed here or your session has expired.<br/><br/>Please try to login again using the following form: <br/>".$test,false);
//if no course ID was included in the requested URL, redirect to homepage
Display::display_header();
if($print_headers){Display::display_header();}
echo '<divalign="center">';
Display :: display_error_message('<p>Either you are not allowed here or your session has expired.<br/><br/><ahref="'.$home_url.'">Please try to login again from the homepage</a><br/>',false);