You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.9 KiB
59 lines
1.9 KiB
15 years ago
|
<?php
|
||
15 years ago
|
/* For licensing terms, see /license.txt */
|
||
10 years ago
|
|
||
15 years ago
|
/**
|
||
|
* This script displays statistics on the current learning path (scorm)
|
||
|
* This script must be included by lp_controller.php to get basic initialisation
|
||
15 years ago
|
* @package chamilo.learnpath
|
||
15 years ago
|
* @author Yannick Warnier <ywarnier@beeznest.org>
|
||
|
*/
|
||
10 years ago
|
|
||
10 years ago
|
require_once '../inc/global.inc.php';
|
||
15 years ago
|
|
||
10 years ago
|
// When origin is not set that means that the lp_stats are viewed from the "man running" icon
|
||
13 years ago
|
if (!isset($origin)) {
|
||
|
$origin = 'learnpath';
|
||
|
}
|
||
|
|
||
10 years ago
|
$sessionId = isset($_GET['id_session']) ? intval($_GET['id_session']) : api_get_session_id();
|
||
|
$courseCode = isset($_GET['course']) ? intval($_GET['course']) : api_get_course_id();
|
||
|
$userId = isset($_GET['student_id']) ? intval($_GET['student_id']) : api_get_user_id();
|
||
|
$lpId = isset($_GET['lp_id']) ? $_GET['lp_id'] : null;
|
||
|
$lpItemId = isset($_GET['lp_item_id']) ? $_GET['lp_item_id'] : null;
|
||
|
$extendId = isset($_GET['extend_id']) ? $_GET['extend_id'] : null;
|
||
|
$extendAttemptId = isset($_GET['extend_attempt_id']) ? $_GET['extend_attempt_id'] : null;
|
||
|
$extendedAttempt = isset($_GET['extend_attempt']) ? $_GET['extend_attempt'] : null;
|
||
|
$extendedAll = isset($_GET['extend_all']) ? $_GET['extend_all'] : null;
|
||
|
$export = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
|
||
9 years ago
|
$allowExtend = isset($_GET['allow_extend']) ? $_GET['allow_extend'] : 1;
|
||
10 years ago
|
|
||
10 years ago
|
$lpReportType = api_get_setting('lp_show_reduced_report');
|
||
10 years ago
|
$type = 'classic';
|
||
10 years ago
|
if ($lpReportType === 'true') {
|
||
10 years ago
|
$type = 'simple';
|
||
|
}
|
||
10 years ago
|
$courseInfo = api_get_course_info($courseCode);
|
||
|
$output = Tracking::getLpStats(
|
||
|
$userId,
|
||
|
$courseInfo,
|
||
|
$sessionId,
|
||
|
$origin,
|
||
|
$export,
|
||
|
$lpId,
|
||
|
$lpItemId,
|
||
|
$extendId,
|
||
|
$extendAttemptId,
|
||
|
$extendedAttempt,
|
||
10 years ago
|
$extendedAll,
|
||
9 years ago
|
$type,
|
||
|
$allowExtend
|
||
10 years ago
|
);
|
||
|
|
||
|
// Origin = tracking means that teachers see that info in the Reporting tool
|
||
14 years ago
|
if ($origin != 'tracking') {
|
||
13 years ago
|
Display::display_reduced_header();
|
||
14 years ago
|
$output .= "</body></html>";
|
||
15 years ago
|
}
|
||
|
|
||
10 years ago
|
return $output;
|