|
|
@ -26,7 +26,7 @@ in_array( |
|
|
|
['recentlogins', 'tools', 'courses', 'coursebylanguage', 'users', 'users_active', 'session_by_date'] |
|
|
|
['recentlogins', 'tools', 'courses', 'coursebylanguage', 'users', 'users_active', 'session_by_date'] |
|
|
|
) |
|
|
|
) |
|
|
|
) { |
|
|
|
) { |
|
|
|
//$htmlHeadXtra[] = api_get_js('chartjs/Chart.min.js'); |
|
|
|
$htmlHeadXtra[] = api_get_build_js('libs/chartjs/chart.js'); |
|
|
|
//$htmlHeadXtra[] = api_get_asset('chartjs-plugin-labels/build/chartjs-plugin-labels.min.js'); |
|
|
|
//$htmlHeadXtra[] = api_get_asset('chartjs-plugin-labels/build/chartjs-plugin-labels.min.js'); |
|
|
|
// Prepare variables for the JS charts |
|
|
|
// Prepare variables for the JS charts |
|
|
|
$url = $reportName = $reportType = $reportOptions = ''; |
|
|
|
$url = $reportName = $reportType = $reportOptions = ''; |
|
|
@ -828,7 +828,7 @@ switch ($report) { |
|
|
|
|
|
|
|
|
|
|
|
$contract = false; |
|
|
|
$contract = false; |
|
|
|
$legalAccept = $extraFieldValueUser->get_values_by_handler_and_field_variable($userId, 'legal_accept'); |
|
|
|
$legalAccept = $extraFieldValueUser->get_values_by_handler_and_field_variable($userId, 'legal_accept'); |
|
|
|
if ($legalAccept && isset($legalAccept['value'])) { |
|
|
|
if ($legalAccept && !empty($legalAccept['value'])) { |
|
|
|
list($legalId, $legalLanguageId, $legalTime) = explode(':', $legalAccept['value']); |
|
|
|
list($legalId, $legalLanguageId, $legalTime) = explode(':', $legalAccept['value']); |
|
|
|
if ($legalId) { |
|
|
|
if ($legalId) { |
|
|
|
$contract = true; |
|
|
|
$contract = true; |
|
|
@ -925,7 +925,8 @@ switch ($report) { |
|
|
|
$data['chart'], |
|
|
|
$data['chart'], |
|
|
|
'pie', |
|
|
|
'pie', |
|
|
|
$reportOptions1, |
|
|
|
$reportOptions1, |
|
|
|
'canvas1' |
|
|
|
'canvas1', |
|
|
|
|
|
|
|
false |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
$scoreDisplay = ScoreDisplay::instance(); |
|
|
|
$scoreDisplay = ScoreDisplay::instance(); |
|
|
@ -1009,7 +1010,8 @@ switch ($report) { |
|
|
|
$data['chart'], |
|
|
|
$data['chart'], |
|
|
|
'pie', |
|
|
|
'pie', |
|
|
|
$reportOptions2, |
|
|
|
$reportOptions2, |
|
|
|
'canvas2' |
|
|
|
'canvas2', |
|
|
|
|
|
|
|
false |
|
|
|
); |
|
|
|
); |
|
|
|
$extraTables .= $data['table']; |
|
|
|
$extraTables .= $data['table']; |
|
|
|
} |
|
|
|
} |
|
|
@ -1017,8 +1019,8 @@ switch ($report) { |
|
|
|
// graph 3 |
|
|
|
// graph 3 |
|
|
|
$languages = api_get_languages(); |
|
|
|
$languages = api_get_languages(); |
|
|
|
$all = []; |
|
|
|
$all = []; |
|
|
|
foreach ($languages as $language) { |
|
|
|
foreach ($languages as $locale => $language) { |
|
|
|
$conditions = ['language' => $language]; |
|
|
|
$conditions = ['locale' => $locale]; |
|
|
|
$key = $language; |
|
|
|
$key = $language; |
|
|
|
if ('2' === substr($language, -1)) { |
|
|
|
if ('2' === substr($language, -1)) { |
|
|
|
$key = str_replace(2, '', $language); |
|
|
|
$key = str_replace(2, '', $language); |
|
|
@ -1044,7 +1046,8 @@ switch ($report) { |
|
|
|
$data['chart'], |
|
|
|
$data['chart'], |
|
|
|
'pie', |
|
|
|
'pie', |
|
|
|
$reportOptions3, |
|
|
|
$reportOptions3, |
|
|
|
'canvas3' |
|
|
|
'canvas3', |
|
|
|
|
|
|
|
false |
|
|
|
); |
|
|
|
); |
|
|
|
$extraTables .= $data['table']; |
|
|
|
$extraTables .= $data['table']; |
|
|
|
|
|
|
|
|
|
|
@ -1092,7 +1095,8 @@ switch ($report) { |
|
|
|
$data['chart'], |
|
|
|
$data['chart'], |
|
|
|
'pie', |
|
|
|
'pie', |
|
|
|
$reportOptions4, |
|
|
|
$reportOptions4, |
|
|
|
'canvas4' |
|
|
|
'canvas4', |
|
|
|
|
|
|
|
false |
|
|
|
); |
|
|
|
); |
|
|
|
$extraTables .= $data['table']; |
|
|
|
$extraTables .= $data['table']; |
|
|
|
} |
|
|
|
} |
|
|
@ -1160,7 +1164,8 @@ switch ($report) { |
|
|
|
$data['chart'], |
|
|
|
$data['chart'], |
|
|
|
'pie', |
|
|
|
'pie', |
|
|
|
$reportOptions8, |
|
|
|
$reportOptions8, |
|
|
|
'canvas8' |
|
|
|
'canvas8', |
|
|
|
|
|
|
|
false |
|
|
|
); |
|
|
|
); |
|
|
|
$extraTables .= $data['table']; |
|
|
|
$extraTables .= $data['table']; |
|
|
|
} |
|
|
|
} |
|
|
@ -1211,7 +1216,8 @@ switch ($report) { |
|
|
|
$data['chart'], |
|
|
|
$data['chart'], |
|
|
|
'pie', |
|
|
|
'pie', |
|
|
|
$reportOptions5, |
|
|
|
$reportOptions5, |
|
|
|
'canvas5' |
|
|
|
'canvas5', |
|
|
|
|
|
|
|
false |
|
|
|
); |
|
|
|
); |
|
|
|
$extraTables .= $data['table']; |
|
|
|
$extraTables .= $data['table']; |
|
|
|
} |
|
|
|
} |
|
|
@ -1253,7 +1259,8 @@ switch ($report) { |
|
|
|
$data['chart'], |
|
|
|
$data['chart'], |
|
|
|
'pie', |
|
|
|
'pie', |
|
|
|
$reportOptions6, |
|
|
|
$reportOptions6, |
|
|
|
'canvas6' |
|
|
|
'canvas6', |
|
|
|
|
|
|
|
false |
|
|
|
); |
|
|
|
); |
|
|
|
$extraTables .= $data['table']; |
|
|
|
$extraTables .= $data['table']; |
|
|
|
} |
|
|
|
} |
|
|
@ -1294,12 +1301,13 @@ switch ($report) { |
|
|
|
$data['chart'], |
|
|
|
$data['chart'], |
|
|
|
'pie', |
|
|
|
'pie', |
|
|
|
$reportOptions7, |
|
|
|
$reportOptions7, |
|
|
|
'canvas7' |
|
|
|
'canvas7', |
|
|
|
|
|
|
|
false |
|
|
|
); |
|
|
|
); |
|
|
|
$extraTables .= $data['table']; |
|
|
|
$extraTables .= $data['table']; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$header = Display::page_subheader2(get_lang('TotalNumberOfStudents').': '.$studentCount); |
|
|
|
$header = Display::page_subheader2(get_lang('Total number of students').': '.$studentCount); |
|
|
|
$content = $header.$extraTables.$graph.$content; |
|
|
|
$content = $header.$extraTables.$graph.$content; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1321,7 +1329,7 @@ switch ($report) { |
|
|
|
$counts[$minutes] = $row[0]; |
|
|
|
$counts[$minutes] = $row[0]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
$content = '<div class="pull-left">'.get_lang('UsersOnline').'</div> |
|
|
|
$content = '<div class="pull-left">'.get_lang('Users online').'</div> |
|
|
|
<div class="pull-right">'.api_get_local_time().'</div> |
|
|
|
<div class="pull-right">'.api_get_local_time().'</div> |
|
|
|
<hr /> |
|
|
|
<hr /> |
|
|
|
<div class="tracking-course-summary"> |
|
|
|
<div class="tracking-course-summary"> |
|
|
@ -1333,7 +1341,7 @@ switch ($report) { |
|
|
|
<i class="fa fa-thermometer-4" aria-hidden="true"></i> |
|
|
|
<i class="fa fa-thermometer-4" aria-hidden="true"></i> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<div class="tracking-info"> |
|
|
|
<div class="tracking-info"> |
|
|
|
<div class="tracking-text">'.get_lang('UsersOnline').' (3\')</div> |
|
|
|
<div class="tracking-text">'.get_lang('Users online').' (3\')</div> |
|
|
|
<div class="tracking-number">'.getOnlineUsersCount(3).'</div> |
|
|
|
<div class="tracking-number">'.getOnlineUsersCount(3).'</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -1346,7 +1354,7 @@ switch ($report) { |
|
|
|
<i class="fa fa-thermometer-3" aria-hidden="true"></i> |
|
|
|
<i class="fa fa-thermometer-3" aria-hidden="true"></i> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<div class="tracking-info"> |
|
|
|
<div class="tracking-info"> |
|
|
|
<div class="tracking-text">'.get_lang('UsersOnline').' (5\')</div> |
|
|
|
<div class="tracking-text">'.get_lang('Users online').' (5\')</div> |
|
|
|
<div class="tracking-number">'.getOnlineUsersCount(5).'</div> |
|
|
|
<div class="tracking-number">'.getOnlineUsersCount(5).'</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -1372,14 +1380,14 @@ switch ($report) { |
|
|
|
<i class="fa fa-thermometer-1" aria-hidden="true"></i> |
|
|
|
<i class="fa fa-thermometer-1" aria-hidden="true"></i> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<div class="tracking-info"> |
|
|
|
<div class="tracking-info"> |
|
|
|
<div class="tracking-text">'.get_lang('UsersOnline').' (120\')</div> |
|
|
|
<div class="tracking-text">'.get_lang('Users online').' (120\')</div> |
|
|
|
<div class="tracking-number">'.getOnlineUsersCount(120).'</div> |
|
|
|
<div class="tracking-number">'.getOnlineUsersCount(120).'</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="pull-left">'.get_lang('UsersActiveInATest').'</div> |
|
|
|
<div class="pull-left">'.get_lang('Users active in a test').'</div> |
|
|
|
<hr /> |
|
|
|
<hr /> |
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-lg-3 col-sm-3"> |
|
|
|
<div class="col-lg-3 col-sm-3"> |
|
|
|