|
|
|
@ -734,7 +734,7 @@ if (isset($_GET['cidReq']) && $_GET['cidReq']!='') { |
|
|
|
|
$no_qualification = false; |
|
|
|
|
|
|
|
|
|
// Show certificate link. |
|
|
|
|
|
|
|
|
|
$certificate = array(); |
|
|
|
|
if ($category != '0') { |
|
|
|
|
$cat = new Category(); |
|
|
|
|
$category_id = intval($_GET['selectcat']); |
|
|
|
@ -744,12 +744,14 @@ if ($category != '0') { |
|
|
|
|
if ($show_message == '') { |
|
|
|
|
// Student |
|
|
|
|
if (!api_is_allowed_to_edit()) { |
|
|
|
|
$certificate_html = Category::register_user_certificate( |
|
|
|
|
$certificate = Category::register_user_certificate( |
|
|
|
|
$category_id, |
|
|
|
|
$stud_id |
|
|
|
|
); |
|
|
|
|
if ($certificate_html) { |
|
|
|
|
echo $certificate_html; |
|
|
|
|
if (!empty($certificate)) { |
|
|
|
|
echo '<div class="actions" align="right">'; |
|
|
|
|
echo $certificate['pdf_link']; |
|
|
|
|
echo '</div>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -759,11 +761,24 @@ if (api_is_allowed_to_edit(null, true)) { |
|
|
|
|
// Tool introduction |
|
|
|
|
Display::display_introduction_section(TOOL_GRADEBOOK, array('ToolbarSet' => 'AssessmentsIntroduction')); |
|
|
|
|
|
|
|
|
|
if ( (isset ($_GET['selectcat']) && $_GET['selectcat']<>0)) { |
|
|
|
|
if ((isset ($_GET['selectcat']) && $_GET['selectcat']<>0)) { |
|
|
|
|
// |
|
|
|
|
} else { |
|
|
|
|
if (((isset ($_GET['selectcat']) && $_GET['selectcat']==0) || ((isset($_GET['cidReq']) && $_GET['cidReq']!==''))) || isset($_GET['isStudentView']) && $_GET['isStudentView']=='false') { |
|
|
|
|
$cats = Category :: load(null, null, $course_code, null, null, $session_id, false); |
|
|
|
|
if (( |
|
|
|
|
(isset ($_GET['selectcat']) && $_GET['selectcat'] == 0) || ( |
|
|
|
|
(isset($_GET['cidReq']) && $_GET['cidReq'] !== '')) |
|
|
|
|
) || |
|
|
|
|
isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'false' |
|
|
|
|
) { |
|
|
|
|
$cats = Category:: load( |
|
|
|
|
null, |
|
|
|
|
null, |
|
|
|
|
$course_code, |
|
|
|
|
null, |
|
|
|
|
null, |
|
|
|
|
$session_id, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -775,10 +790,11 @@ if (isset($first_time) && $first_time==1 && api_is_allowed_to_edit(null,true)) { |
|
|
|
|
|
|
|
|
|
if (!empty($cats)) { |
|
|
|
|
if ((api_get_setting('gradebook_enable_grade_model') == 'true') && |
|
|
|
|
(api_is_platform_admin() || (api_is_allowed_to_edit(null, true) && |
|
|
|
|
api_get_setting('teachers_can_change_grade_model_settings') == 'true')) |
|
|
|
|
( |
|
|
|
|
api_is_platform_admin() || (api_is_allowed_to_edit(null, true) && |
|
|
|
|
api_get_setting('teachers_can_change_grade_model_settings') == 'true') |
|
|
|
|
) |
|
|
|
|
) { |
|
|
|
|
|
|
|
|
|
// Getting grade models. |
|
|
|
|
$obj = new GradeModel(); |
|
|
|
|
$grade_models = $obj->get_all(); |
|
|
|
@ -848,7 +864,8 @@ if (isset($first_time) && $first_time==1 && api_is_allowed_to_edit(null,true)) { |
|
|
|
|
$is_platform_admin, |
|
|
|
|
$simple_search_form, |
|
|
|
|
false, |
|
|
|
|
true |
|
|
|
|
true, |
|
|
|
|
$certificate |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if (api_is_allowed_to_edit(null,true) && |
|
|
|
|