|
|
@ -4,7 +4,7 @@ |
|
|
|
use ChamiloSession as Session; |
|
|
|
use ChamiloSession as Session; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @package chamilo.tracking |
|
|
|
* @package chamilo.tracking |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
require_once __DIR__.'/../inc/global.inc.php'; |
|
|
|
require_once __DIR__.'/../inc/global.inc.php'; |
|
|
@ -12,8 +12,6 @@ $current_course_tool = TOOL_TRACKING; |
|
|
|
|
|
|
|
|
|
|
|
$course_info = api_get_course_info(); |
|
|
|
$course_info = api_get_course_info(); |
|
|
|
$groupId = isset($_REQUEST['gidReq']) ? intval($_REQUEST['gidReq']) : 0; |
|
|
|
$groupId = isset($_REQUEST['gidReq']) ? intval($_REQUEST['gidReq']) : 0; |
|
|
|
//$groupId = api_get_group_id(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$from_myspace = false; |
|
|
|
$from_myspace = false; |
|
|
|
$from = isset($_GET['from']) ? $_GET['from'] : null; |
|
|
|
$from = isset($_GET['from']) ? $_GET['from'] : null; |
|
|
|
|
|
|
|
|
|
|
@ -66,7 +64,10 @@ $csv_content = array(); |
|
|
|
if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') { |
|
|
|
if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') { |
|
|
|
$interbreadcrumb[] = array('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin')); |
|
|
|
$interbreadcrumb[] = array('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin')); |
|
|
|
$interbreadcrumb[] = array('url' => '../session/session_list.php', 'name' => get_lang('SessionList')); |
|
|
|
$interbreadcrumb[] = array('url' => '../session/session_list.php', 'name' => get_lang('SessionList')); |
|
|
|
$interbreadcrumb[] = array('url' => '../session/resume_session.php?id_session='.api_get_session_id(), 'name' => get_lang('SessionOverview')); |
|
|
|
$interbreadcrumb[] = array( |
|
|
|
|
|
|
|
'url' => '../session/resume_session.php?id_session='.api_get_session_id(), |
|
|
|
|
|
|
|
'name' => get_lang('SessionOverview'), |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$view = (isset($_REQUEST['view']) ? $_REQUEST['view'] : ''); |
|
|
|
$view = (isset($_REQUEST['view']) ? $_REQUEST['view'] : ''); |
|
|
@ -114,7 +115,10 @@ if (empty($groupId)) { |
|
|
|
Display::return_icon('group.png', get_lang('GroupReporting'), array(), ICON_SIZE_MEDIUM), |
|
|
|
Display::return_icon('group.png', get_lang('GroupReporting'), array(), ICON_SIZE_MEDIUM), |
|
|
|
'course_log_groups.php?'.api_get_cidreq() |
|
|
|
'course_log_groups.php?'.api_get_cidreq() |
|
|
|
); |
|
|
|
); |
|
|
|
echo Display::url(Display::return_icon('course_na.png', get_lang('CourseTracking'), array(), ICON_SIZE_MEDIUM), '#'); |
|
|
|
echo Display::url( |
|
|
|
|
|
|
|
Display::return_icon('course_na.png', get_lang('CourseTracking'), array(), ICON_SIZE_MEDIUM), |
|
|
|
|
|
|
|
'#' |
|
|
|
|
|
|
|
); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
echo Display::url( |
|
|
|
echo Display::url( |
|
|
|
Display::return_icon('group_na.png', get_lang('GroupReporting'), array(), ICON_SIZE_MEDIUM), |
|
|
|
Display::return_icon('group_na.png', get_lang('GroupReporting'), array(), ICON_SIZE_MEDIUM), |
|
|
@ -149,17 +153,15 @@ if ($lpReporting) { |
|
|
|
$flat_list = $list->get_flat_list(); |
|
|
|
$flat_list = $list->get_flat_list(); |
|
|
|
|
|
|
|
|
|
|
|
if (count($flat_list) > 0) { |
|
|
|
if (count($flat_list) > 0) { |
|
|
|
|
|
|
|
|
|
|
|
// learning path tracking |
|
|
|
// learning path tracking |
|
|
|
echo '<div class="report_section"> |
|
|
|
echo '<div class="report_section">'; |
|
|
|
'.Display::page_subheader( |
|
|
|
echo Display::page_subheader( |
|
|
|
Display::return_icon( |
|
|
|
Display::return_icon( |
|
|
|
'scorms.gif', |
|
|
|
'scorms.gif', |
|
|
|
get_lang('AverageProgressInLearnpath') |
|
|
|
get_lang('AverageProgressInLearnpath') |
|
|
|
).get_lang('AverageProgressInLearnpath') |
|
|
|
).get_lang('AverageProgressInLearnpath') |
|
|
|
).' |
|
|
|
); |
|
|
|
<table class="data_table">'; |
|
|
|
echo '<table class="data_table">'; |
|
|
|
|
|
|
|
|
|
|
|
if ($export_csv) { |
|
|
|
if ($export_csv) { |
|
|
|
$temp = array(get_lang('AverageProgressInLearnpath', ''), ''); |
|
|
|
$temp = array(get_lang('AverageProgressInLearnpath', ''), ''); |
|
|
|
$csv_content[] = array('', ''); |
|
|
|
$csv_content[] = array('', ''); |
|
|
@ -204,19 +206,16 @@ if ($lpReporting) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($exerciseReporting) { |
|
|
|
if ($exerciseReporting) { |
|
|
|
|
|
|
|
|
|
|
|
// Exercices tracking. |
|
|
|
// Exercices tracking. |
|
|
|
echo '<div class="report_section"> |
|
|
|
echo '<div class="report_section">'; |
|
|
|
'.Display::page_subheader( |
|
|
|
echo Display::page_subheader( |
|
|
|
Display::return_icon( |
|
|
|
Display::return_icon( |
|
|
|
'quiz.png', |
|
|
|
'quiz.png', |
|
|
|
get_lang('AverageResultsToTheExercices') |
|
|
|
get_lang('AverageResultsToTheExercices') |
|
|
|
).get_lang('AverageResultsToTheExercices') |
|
|
|
).get_lang('AverageResultsToTheExercices') |
|
|
|
).' |
|
|
|
); |
|
|
|
<table class="data_table">'; |
|
|
|
echo '<table class="data_table">'; |
|
|
|
|
|
|
|
|
|
|
|
$course_id = api_get_course_int_id(); |
|
|
|
$course_id = api_get_course_int_id(); |
|
|
|
|
|
|
|
|
|
|
|
$sql = "SELECT id, title FROM $TABLEQUIZ |
|
|
|
$sql = "SELECT id, title FROM $TABLEQUIZ |
|
|
|
WHERE c_id = $course_id AND active <> -1 AND session_id = $session_id"; |
|
|
|
WHERE c_id = $course_id AND active <> -1 AND session_id = $session_id"; |
|
|
|
$rs = Database::query($sql); |
|
|
|
$rs = Database::query($sql); |
|
|
@ -243,18 +242,16 @@ if ($exerciseReporting) { |
|
|
|
$quiz_avg_score += $avg_student_score; |
|
|
|
$quiz_avg_score += $avg_student_score; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
$studentCount = ($studentCount == 0 || is_null( |
|
|
|
$studentCount = ($studentCount == 0 || is_null($studentCount) || $studentCount == '') ? 1 : $studentCount; |
|
|
|
$studentCount |
|
|
|
|
|
|
|
) || $studentCount == '') ? 1 : $studentCount; |
|
|
|
|
|
|
|
$quiz_avg_score = round(($quiz_avg_score / $studentCount), 2).'%'; |
|
|
|
$quiz_avg_score = round(($quiz_avg_score / $studentCount), 2).'%'; |
|
|
|
$url = api_get_path( |
|
|
|
$url = api_get_path(WEB_CODE_PATH).'exercise/overview.php?exerciseId='.$quiz['id'].$course_path_params; |
|
|
|
WEB_CODE_PATH |
|
|
|
|
|
|
|
).'exercise/overview.php?exerciseId='.$quiz['id'].$course_path_params; |
|
|
|
echo '<tr><td>'; |
|
|
|
|
|
|
|
echo Display::url( |
|
|
|
echo '<tr><td>'.Display::url( |
|
|
|
$quiz['title'], |
|
|
|
$quiz['title'], |
|
|
|
$url |
|
|
|
$url |
|
|
|
); |
|
|
|
).'</td><td align="right">'.$quiz_avg_score.'</td></tr>'; |
|
|
|
echo '</td><td align="right">'.$quiz_avg_score.'</td></tr>'; |
|
|
|
if ($export_csv) { |
|
|
|
if ($export_csv) { |
|
|
|
$temp = array($quiz['title'], $quiz_avg_score); |
|
|
|
$temp = array($quiz['title'], $quiz_avg_score); |
|
|
|
$csv_content[] = $temp; |
|
|
|
$csv_content[] = $temp; |
|
|
@ -267,13 +264,11 @@ if ($exerciseReporting) { |
|
|
|
$csv_content[] = $temp; |
|
|
|
$csv_content[] = $temp; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
echo '</table></div>'; |
|
|
|
echo '</table></div>'; |
|
|
|
echo '<div class="clear"></div>'; |
|
|
|
echo '<div class="clear"></div>'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$filterByUsers = array(); |
|
|
|
$filterByUsers = array(); |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($groupId)) { |
|
|
|
if (!empty($groupId)) { |
|
|
|
$filterByUsers = $student_ids; |
|
|
|
$filterByUsers = $student_ids; |
|
|
|
} |
|
|
|
} |
|
|
@ -304,15 +299,13 @@ if ($export_csv) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Forums tracking. |
|
|
|
// Forums tracking. |
|
|
|
echo '<div class="report_section"> |
|
|
|
echo '<div class="report_section">'; |
|
|
|
'.Display::page_subheader( |
|
|
|
echo Display::page_subheader( |
|
|
|
Display::return_icon('forum.gif', get_lang('Forum')). |
|
|
|
Display::return_icon('forum.gif', get_lang('Forum')). |
|
|
|
get_lang('Forum').' - <a href="../forum/index.php?'.api_get_cidreq().'">'. |
|
|
|
get_lang('Forum').' - <a href="../forum/index.php?'.api_get_cidreq().'">'. |
|
|
|
get_lang('SeeDetail').'</a>' |
|
|
|
get_lang('SeeDetail').'</a>' |
|
|
|
). |
|
|
|
); |
|
|
|
'<table class="data_table">'; |
|
|
|
echo '<table class="data_table">'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo '<tr><td>'.get_lang('ForumForumsNumber').'</td><td align="right">'.$count_number_of_forums_by_course.'</td></tr>'; |
|
|
|
echo '<tr><td>'.get_lang('ForumForumsNumber').'</td><td align="right">'.$count_number_of_forums_by_course.'</td></tr>'; |
|
|
|
echo '<tr><td>'.get_lang('ForumThreadsNumber').'</td><td align="right">'.$count_number_of_threads_by_course.'</td></tr>'; |
|
|
|
echo '<tr><td>'.get_lang('ForumThreadsNumber').'</td><td align="right">'.$count_number_of_threads_by_course.'</td></tr>'; |
|
|
|
echo '<tr><td>'.get_lang('ForumPostsNumber').'</td><td align="right">'.$count_number_of_posts_by_course.'</td></tr>'; |
|
|
|
echo '<tr><td>'.get_lang('ForumPostsNumber').'</td><td align="right">'.$count_number_of_posts_by_course.'</td></tr>'; |
|
|
@ -321,11 +314,12 @@ echo '<div class="clear"></div>'; |
|
|
|
|
|
|
|
|
|
|
|
// Chat tracking. |
|
|
|
// Chat tracking. |
|
|
|
if ($showChatReporting) { |
|
|
|
if ($showChatReporting) { |
|
|
|
echo '<div class="report_section"> |
|
|
|
echo '<div class="report_section">'; |
|
|
|
'.Display::page_subheader( |
|
|
|
echo Display::page_subheader( |
|
|
|
Display::return_icon('chat.gif', get_lang('Chat')).get_lang('Chat') |
|
|
|
Display::return_icon('chat.gif', get_lang('Chat')).get_lang('Chat') |
|
|
|
).' |
|
|
|
); |
|
|
|
<table class="data_table">'; |
|
|
|
|
|
|
|
|
|
|
|
echo '<table class="data_table">'; |
|
|
|
$chat_connections_during_last_x_days_by_course = Tracking::chat_connections_during_last_x_days_by_course( |
|
|
|
$chat_connections_during_last_x_days_by_course = Tracking::chat_connections_during_last_x_days_by_course( |
|
|
|
$course_code, |
|
|
|
$course_code, |
|
|
|
7, |
|
|
|
7, |
|
|
@ -338,13 +332,15 @@ if ($showChatReporting) { |
|
|
|
get_lang('ChatConnectionsDuringLastXDays', ''), |
|
|
|
get_lang('ChatConnectionsDuringLastXDays', ''), |
|
|
|
'7' |
|
|
|
'7' |
|
|
|
), |
|
|
|
), |
|
|
|
$chat_connections_during_last_x_days_by_course |
|
|
|
$chat_connections_during_last_x_days_by_course, |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
echo '<tr><td>'.sprintf( |
|
|
|
echo '<tr><td>'; |
|
|
|
get_lang('ChatConnectionsDuringLastXDays'), |
|
|
|
echo sprintf( |
|
|
|
'7' |
|
|
|
get_lang('ChatConnectionsDuringLastXDays'), |
|
|
|
).'</td><td align="right">'.$chat_connections_during_last_x_days_by_course.'</td></tr>'; |
|
|
|
'7' |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
echo '</td><td align="right">'.$chat_connections_during_last_x_days_by_course.'</td></tr>'; |
|
|
|
|
|
|
|
|
|
|
|
echo '</table></div>'; |
|
|
|
echo '</table></div>'; |
|
|
|
echo '<div class="clear"></div>'; |
|
|
|
echo '<div class="clear"></div>'; |
|
|
@ -352,14 +348,14 @@ if ($showChatReporting) { |
|
|
|
|
|
|
|
|
|
|
|
// Tools tracking. |
|
|
|
// Tools tracking. |
|
|
|
if ($showTrackingReporting) { |
|
|
|
if ($showTrackingReporting) { |
|
|
|
echo '<div class="report_section"> |
|
|
|
echo '<div class="report_section">'; |
|
|
|
'.Display::page_subheader( |
|
|
|
echo Display::page_subheader( |
|
|
|
Display::return_icon( |
|
|
|
Display::return_icon( |
|
|
|
'acces_tool.gif', |
|
|
|
'acces_tool.gif', |
|
|
|
get_lang('ToolsMostUsed') |
|
|
|
get_lang('ToolsMostUsed') |
|
|
|
).get_lang('ToolsMostUsed') |
|
|
|
).get_lang('ToolsMostUsed') |
|
|
|
).' |
|
|
|
); |
|
|
|
<table class="data_table">'; |
|
|
|
echo '<table class="data_table">'; |
|
|
|
|
|
|
|
|
|
|
|
$tools_most_used = Tracking::get_tools_most_used_by_course( |
|
|
|
$tools_most_used = Tracking::get_tools_most_used_by_course( |
|
|
|
$course_id, |
|
|
|
$course_id, |
|
|
@ -373,16 +369,14 @@ if ($showTrackingReporting) { |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($tools_most_used)) { |
|
|
|
if (!empty($tools_most_used)) { |
|
|
|
foreach ($tools_most_used as $row) { |
|
|
|
foreach ($tools_most_used as $row) { |
|
|
|
echo ' <tr> |
|
|
|
echo '<tr> |
|
|
|
<td>'.get_lang(ucfirst($row['access_tool'])).'</td> |
|
|
|
<td>'.get_lang(ucfirst($row['access_tool'])).'</td> |
|
|
|
<td align="right">'.$row['count_access_tool'].' '.get_lang( |
|
|
|
<td align="right">'.$row['count_access_tool'].' '.get_lang('Clicks').'</td> |
|
|
|
'Clicks' |
|
|
|
</tr>'; |
|
|
|
).'</td> |
|
|
|
|
|
|
|
</tr>'; |
|
|
|
|
|
|
|
if ($export_csv) { |
|
|
|
if ($export_csv) { |
|
|
|
$temp = array( |
|
|
|
$temp = array( |
|
|
|
get_lang(ucfirst($row['access_tool']), ''), |
|
|
|
get_lang(ucfirst($row['access_tool']), ''), |
|
|
|
$row['count_access_tool'].' '.get_lang('Clicks', '') |
|
|
|
$row['count_access_tool'].' '.get_lang('Clicks', ''), |
|
|
|
); |
|
|
|
); |
|
|
|
$csv_content[] = $temp; |
|
|
|
$csv_content[] = $temp; |
|
|
|
} |
|
|
|
} |
|
|
@ -397,23 +391,21 @@ if ($documentReporting) { |
|
|
|
// Documents tracking. |
|
|
|
// Documents tracking. |
|
|
|
if (!isset($_GET['num']) || empty($_GET['num'])) { |
|
|
|
if (!isset($_GET['num']) || empty($_GET['num'])) { |
|
|
|
$num = 3; |
|
|
|
$num = 3; |
|
|
|
$link = ' - <a href="'.api_get_self().'?'.api_get_cidreq( |
|
|
|
$link = ' - <a href="'.api_get_self().'?'.api_get_cidreq().'&num=1#documents_tracking">'.get_lang('SeeDetail').'</a>'; |
|
|
|
).'&num=1#documents_tracking">'.get_lang('SeeDetail').'</a>'; |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$num = 1000; |
|
|
|
$num = 1000; |
|
|
|
$link = ' - <a href="'.api_get_self().'?'.api_get_cidreq( |
|
|
|
$link = ' - <a href="'.api_get_self().'?'.api_get_cidreq().'&num=0#documents_tracking">'.get_lang('ViewMinus').'</a>'; |
|
|
|
).'&num=0#documents_tracking">'.get_lang('ViewMinus').'</a>'; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
echo '<a name="documents_tracking" id="a"></a><div class="report_section"> |
|
|
|
echo '<a name="documents_tracking" id="a"></a><div class="report_section">'; |
|
|
|
'.Display::page_subheader( |
|
|
|
echo Display::page_subheader( |
|
|
|
Display::return_icon( |
|
|
|
Display::return_icon( |
|
|
|
'documents.gif', |
|
|
|
'documents.gif', |
|
|
|
get_lang('DocumentsMostDownloaded') |
|
|
|
get_lang('DocumentsMostDownloaded') |
|
|
|
).' '.get_lang('DocumentsMostDownloaded').$link |
|
|
|
).' '.get_lang('DocumentsMostDownloaded').$link |
|
|
|
).' |
|
|
|
); |
|
|
|
<table class="data_table">'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo '<table class="data_table">'; |
|
|
|
$documents_most_downloaded = Tracking::get_documents_most_downloaded_by_course( |
|
|
|
$documents_most_downloaded = Tracking::get_documents_most_downloaded_by_course( |
|
|
|
$course_code, |
|
|
|
$course_code, |
|
|
|
$session_id, |
|
|
|
$session_id, |
|
|
@ -429,20 +421,20 @@ if ($documentReporting) { |
|
|
|
if (!empty($documents_most_downloaded)) { |
|
|
|
if (!empty($documents_most_downloaded)) { |
|
|
|
foreach ($documents_most_downloaded as $row) { |
|
|
|
foreach ($documents_most_downloaded as $row) { |
|
|
|
echo '<tr> |
|
|
|
echo '<tr> |
|
|
|
<td>'.Display::url( |
|
|
|
<td>'; |
|
|
|
$row['down_doc_path'], |
|
|
|
echo Display::url( |
|
|
|
api_get_path( |
|
|
|
$row['down_doc_path'], |
|
|
|
WEB_CODE_PATH |
|
|
|
api_get_path( |
|
|
|
).'document/show_content.php?file='.$row['down_doc_path'].$course_path_params |
|
|
|
WEB_CODE_PATH |
|
|
|
).'</td> |
|
|
|
).'document/show_content.php?file='.$row['down_doc_path'].$course_path_params |
|
|
|
<td align="right">'.$row['count_down'].' '.get_lang( |
|
|
|
); |
|
|
|
'Clicks' |
|
|
|
echo '</td> |
|
|
|
).'</td> |
|
|
|
<td align="right">'.$row['count_down'].' '.get_lang('Clicks').'</td> |
|
|
|
</tr>'; |
|
|
|
</tr>'; |
|
|
|
if ($export_csv) { |
|
|
|
if ($export_csv) { |
|
|
|
$temp = array( |
|
|
|
$temp = array( |
|
|
|
$row['down_doc_path'], |
|
|
|
$row['down_doc_path'], |
|
|
|
$row['count_down'].' '.get_lang('Clicks', '') |
|
|
|
$row['count_down'].' '.get_lang('Clicks', ''), |
|
|
|
); |
|
|
|
); |
|
|
|
$csv_content[] = $temp; |
|
|
|
$csv_content[] = $temp; |
|
|
|
} |
|
|
|
} |
|
|
@ -455,22 +447,19 @@ if ($documentReporting) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
echo '</table></div>'; |
|
|
|
echo '</table></div>'; |
|
|
|
|
|
|
|
|
|
|
|
echo '<div class="clear"></div>'; |
|
|
|
echo '<div class="clear"></div>'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($linkReporting) { |
|
|
|
if ($linkReporting) { |
|
|
|
|
|
|
|
|
|
|
|
// links tracking |
|
|
|
// links tracking |
|
|
|
echo '<div class="report_section"> |
|
|
|
echo '<div class="report_section">'; |
|
|
|
'.Display::page_subheader( |
|
|
|
echo Display::page_subheader( |
|
|
|
Display::return_icon( |
|
|
|
Display::return_icon( |
|
|
|
'link.gif', |
|
|
|
'link.gif', |
|
|
|
get_lang('LinksMostClicked') |
|
|
|
get_lang('LinksMostClicked') |
|
|
|
).' '.get_lang('LinksMostClicked') |
|
|
|
).' '.get_lang('LinksMostClicked') |
|
|
|
).' |
|
|
|
); |
|
|
|
<table class="data_table">'; |
|
|
|
echo '<table class="data_table">'; |
|
|
|
|
|
|
|
|
|
|
|
$links_most_visited = Tracking::get_links_most_visited_by_course( |
|
|
|
$links_most_visited = Tracking::get_links_most_visited_by_course( |
|
|
|
$course_code, |
|
|
|
$course_code, |
|
|
|
$session_id |
|
|
|
$session_id |
|
|
@ -484,19 +473,16 @@ if ($linkReporting) { |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($links_most_visited)) { |
|
|
|
if (!empty($links_most_visited)) { |
|
|
|
foreach ($links_most_visited as $row) { |
|
|
|
foreach ($links_most_visited as $row) { |
|
|
|
echo ' <tr> |
|
|
|
echo '<tr><td>'; |
|
|
|
<td>'.Display::url( |
|
|
|
echo Display::url( |
|
|
|
$row['title'].' ('.$row['url'].')', |
|
|
|
$row['title'].' ('.$row['url'].')', |
|
|
|
$row['url'] |
|
|
|
$row['url'] |
|
|
|
).'</td> |
|
|
|
); |
|
|
|
<td align="right">'.$row['count_visits'].' '.get_lang( |
|
|
|
echo '</td><td align="right">'.$row['count_visits'].' '.get_lang('Clicks').'</td></tr>'; |
|
|
|
'Clicks' |
|
|
|
|
|
|
|
).'</td> |
|
|
|
|
|
|
|
</tr>'; |
|
|
|
|
|
|
|
if ($export_csv) { |
|
|
|
if ($export_csv) { |
|
|
|
$temp = array( |
|
|
|
$temp = array( |
|
|
|
$row['title'], |
|
|
|
$row['title'], |
|
|
|
$row['count_visits'].' '.get_lang('Clicks', '') |
|
|
|
$row['count_visits'].' '.get_lang('Clicks', ''), |
|
|
|
); |
|
|
|
); |
|
|
|
$csv_content[] = $temp; |
|
|
|
$csv_content[] = $temp; |
|
|
|
} |
|
|
|
} |
|
|
@ -515,7 +501,7 @@ if ($linkReporting) { |
|
|
|
// send the csv file if asked |
|
|
|
// send the csv file if asked |
|
|
|
if ($export_csv) { |
|
|
|
if ($export_csv) { |
|
|
|
ob_end_clean(); |
|
|
|
ob_end_clean(); |
|
|
|
Export :: arrayToCsv($csv_content, 'reporting_course_tools'); |
|
|
|
Export:: arrayToCsv($csv_content, 'reporting_course_tools'); |
|
|
|
exit; |
|
|
|
exit; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|