<img src="../img/scormbuilder.gif" align="absbottom"> ' . get_lang('AverageProgressInLearnpath') . ' </h4> <table class="data_table">'; $list = new LearnpathList($student); $flat_list = $list->get_flat_list(); if ($export_csv) { $temp = array(get_lang('AverageProgressInLearnpath'), ''); $csv_content[] = array('', ''); $csv_content[] = $temp; } if (count($flat_list) > 0) { foreach ($flat_list as $lp_id => $lp) { $lp_avg_progress = 0; foreach ($a_students as $student_id => $student) { // get the progress in learning pathes $lp_avg_progress += learnpath::get_db_progress($lp_id, $student_id); } if ($nbStudents > 0) { $lp_avg_progress = $lp_avg_progress / $nbStudents; } echo '<tr><td>' . $lp['lp_name'] . '</td><td align="right">' . round($lp_avg_progress, 1) . ' %</td>'; if (api_get_setting('enableScormCloud', 'enableScormCloud') == 'true') { echo '<td>'; require_once '../scorm_cloud/scorm_cloud.lib.php'; $cid = $_REQUEST['cidReq']; if (cloud_isCloudCourse($cid, $lp_id)) { echo '<center><a href="../scorm_cloud/cloudReport_course.php?' . api_get_cidreq() . '&lp_id=' . $lp_id . '"><img src="' . api_get_path(WEB_IMG_PATH) . '2rightarrow.gif" border="0" /></a></center>'; } echo '</td>'; } echo '</tr>';
<a href="' . $url_start_lp . '">' . $my_title . '</a>' . $session_img . $extra . "</td>"; $dsp_desc = ''; $dsp_export = ''; $dsp_edit = ''; $dsp_build = ''; $dsp_edit_close = ''; $dsp_delete = ''; $dsp_visible = ''; $dsp_default_view = ''; $dsp_debug = ''; $dsp_order = ''; $progress = learnpath::get_db_progress($id, api_get_user_id(), '%', '', false, api_get_session_id()); if ($is_allowed_to_edit) { $dsp_progress = '<td>' . $progress . '</td>'; } else { $dsp_progress = '<td>' . learnpath::get_progress_bar('%', learnpath::get_db_progress($id, api_get_user_id(), '%', '', false, api_get_session_id())) . '</td>'; } $dsp_edit = '<td class="td_actions">'; $dsp_edit_close = '</td>'; if ($is_allowed_to_edit) { /* if ($current_session == $details['lp_session']) { $dsp_desc = '<td valign="middle" style="color: grey; padding-top:1em;"><em>'.$details['lp_maker'].'</em> '.$details['lp_proximity'].' '.$details['lp_encoding'].'<a href="lp_controller.php?'.api_get_cidreq().'&action=edit&lp_id='.$id.'"> <img src="../img/edit.gif" border="0" title="'.get_lang('LearnpathEditLearnpath').'"></a></td>'."\n"; } else { $dsp_desc = '<td valign="middle" style="color: grey; padding-top:1em;"><em>'.$details['lp_maker'].'</em> '.$details['lp_proximity'].' '.$details['lp_encoding'].'<img src="../img/edit_na.gif" border="0" title="'.get_lang('LearnpathEditLearnpath').'"></td>'." "; } */ /* // Deprecated code, Chamilo 1.8.8. $dsp_desc = '<td valign="middle" style="color: grey; padding-top:1em;"><em>'.$details['lp_maker'].'</em> '.$details['lp_proximity'].' '.$details['lp_encoding'].'</td>'."\n"; */ //$dsp_desc = '<td valign="middle" style="color: grey; padding-top:1em;"><em>'.$details['lp_maker'].'</em> '.$details['lp_proximity'].'<br />'.(learnpath::is_lp_visible_for_student($id,api_get_user_id())?'':'('.get_lang('LPNotVisibleToStudent').')').'</td>'."\n";
$dsp_order = ''; // Select course theme if (!empty($platform_theme)) { $mystyle = $platform_theme; } if (!empty($user_theme)) { $mystyle = $user_theme; } if (!empty($mycoursetheme)) { $mystyle = $mycoursetheme; } $lp_theme_css = $mystyle; if ($display_progress_bar) { $dsp_progress = '<td>' . learnpath::get_progress_bar('%', learnpath::get_db_progress($id, api_get_user_id()), '') . '</td>'; } else { $dsp_progress = '<td style="padding-top:1em;">' . learnpath::get_db_progress($id, api_get_user_id(), 'both') . '</td>'; } if ($is_allowed_to_edit) { $dsp_desc = '<td valign="middle" style="color: grey; padding-top:1em;"><em>' . $details['lp_maker'] . '</em> ' . $details['lp_proximity'] . ' ' . $details['lp_encoding'] . '<a href="lp_controller.php?' . api_get_cidreq() . '&action=edit&lp_id=' . $id . '"> <img src="../img/edit.gif" border="0" title="' . get_lang('_edit_learnpath') . '"></a></td>' . "\n"; /* export */ //Export is inside "Edit" //export not available for normal lps yet /*if($details['lp_type']==1){ $dsp_export = '<td align="center">' . "<a href='".api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id'>" . "<img src=\"../img/cd.gif\" border=\"0\" title=\"".get_lang('Export')."\">" . "</a>" . ""; }elseif($details['lp_type']==2){ $dsp_export = '<td align="center">' . "<a href='".api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id&export_name=".replace_dangerous_char($name,'strict').".zip'>" .
$t_lpi = Database::get_course_table(TABLE_LP_ITEM, $a_infosCours['db_name']); $t_lpv = Database::get_course_table(TABLE_LP_VIEW, $a_infosCours['db_name']); $t_lpiv = Database::get_course_table(TABLE_LP_ITEM_VIEW, $a_infosCours['db_name']); $tbl_stats_exercices = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES); $tbl_stats_attempts = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); $tbl_quiz_questions = Database::get_course_table(TABLE_QUIZ_QUESTION, $a_infosCours['db_name']); /// added for cloud: lp.default_view_mod $sqlLearnpath = "SELECT lp.name,lp.id,lp.default_view_mod\n\t\t\t\t\t\t\t\tFROM {$t_lp} AS lp ORDER BY lp.name ASC\n\t\t\t\t\t\t\t"; $resultLearnpath = api_sql_query($sqlLearnpath, __FILE__, __LINE__); $csv_content[] = array(); $csv_content[] = array(get_lang('Learnpath'), get_lang('Time'), get_lang('Score'), get_lang('Progress'), get_lang('LastConnexion')); if (Database::num_rows($resultLearnpath) > 0) { $i = 0; while ($a_learnpath = Database::fetch_array($resultLearnpath)) { $any_result = false; $progress = learnpath::get_db_progress($a_learnpath['id'], $student_id, '%', $a_infosCours['db_name'], true); if ($progress === null) { $progress = '0%'; } else { $any_result = true; } // calculates time $sql = 'SELECT SUM(total_time) FROM ' . $t_lpiv . ' AS item_view INNER JOIN ' . $t_lpv . ' AS view ON item_view.lp_view_id = view.id AND view.lp_id = ' . $a_learnpath['id'] . ' AND view.user_id = ' . intval($_GET['student']); $rs = api_sql_query($sql, __FILE__, __LINE__); $total_time = 0; if (Database::num_rows($rs) > 0) {