api_is_student_boss() ? '#' : 'index.php', 'name' => get_lang('Reporting')]; $tool_name = get_lang('Report'); $this_section = SECTION_TRACKING; $htmlHeadXtra[] = api_get_jqgrid_js(); $sessionId = isset($_GET['session_id']) ? (int) $_GET['session_id'] : -1; //jqgrid will use this URL to do the selects $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_user_course_report&session_id='.$sessionId; $extra_fields = UserManager::get_extra_fields(0, 100, null, null, true, true); //The order is important you need to check the the $column variable in the model.ajax.php file $columns = [ get_lang('Course'), get_lang('User'), get_lang('e-mail'), get_lang('Man hours'), get_lang('Generated certificate'), get_lang('Completed learning paths'), get_lang('Course progress'), ]; //Column config $column_model = [ [ 'name' => 'course', 'index' => 'title', 'width' => '180', 'align' => 'left', 'wrap_cell' => 'true', 'search' => 'false', ], [ 'name' => 'user', 'index' => 'user', 'width' => '100', 'align' => 'left', 'sortable' => 'false', 'wrap_cell' => 'true', 'search' => 'false', ], [ 'name' => 'email', 'index' => 'email', 'width' => '100', 'align' => 'left', 'sortable' => 'false', 'wrap_cell' => 'true', 'search' => 'false', ], [ 'name' => 'time', 'index' => 'time', 'width' => '50', 'align' => 'left', 'sortable' => 'false', 'search' => 'false', ], [ 'name' => 'certificate', 'index' => 'certificate', 'width' => '50', 'align' => 'left', 'sortable' => 'false', 'search' => 'false', ], [ 'name' => 'progress_100', 'index' => 'progress_100', 'width' => '50', 'align' => 'left', 'sortable' => 'false', 'search' => 'false', ], [ 'name' => 'progress', 'index' => 'progress', 'width' => '50', 'align' => 'left', 'sortable' => 'false', 'search' => 'false', ], ]; if (!empty($extra_fields)) { foreach ($extra_fields as $extra) { $col = [ 'name' => $extra['1'], 'index' => 'extra_'.$extra['1'], 'width' => '120', 'sortable' => 'false', 'wrap_cell' => 'true', ]; $column_model[] = $col; $columns[] = $extra['3']; } } if (api_is_student_boss()) { $column_model[] = [ 'name' => 'group', 'index' => 'group', 'width' => '50', 'align' => 'left', 'sortable' => 'false', ]; $columns[] = get_lang('Group'); } // Autowidth $extra_params['autowidth'] = 'true'; // height auto $extra_params['height'] = 'auto'; $htmlHeadXtra[] = ''; $actions = null; if (api_is_student_boss()) { $actions .= Display::url( Display::return_icon('statistics.png', get_lang('View my progress'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH).'auth/my_progress.php' ); $actions .= Display::url( Display::return_icon('user.png', get_lang('Learners'), [], ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH).'mySpace/student.php' ); $actions .= Display::url( Display::return_icon('statistics.png', get_lang('Corporate report'), [], ICON_SIZE_MEDIUM), "#" ); $actions .= Display::url( Display::return_icon( 'certificate_list.png', get_lang('GradebookSeeListOfLearnersCertificates'), [], ICON_SIZE_MEDIUM ), api_get_path(WEB_CODE_PATH).'gradebook/certificate_report.php' ); } $content = '