Skip to content

Commit

Permalink
Lti provider - Add option to stats learnpath as tool provider - refs …
Browse files Browse the repository at this point in the history
…BT#20093
  • Loading branch information
cfasanando committed Aug 13, 2022
1 parent 941020d commit 864e9e2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main/admin/statistics/index.php
Expand Up @@ -372,6 +372,10 @@
],
];

if ('true' === api_get_plugin_setting('lti_provider', 'enabled')) {
$tools[get_lang('Users')]['report=lti_tool_lp'] = get_lang('LearningPathLTI');
}

$course_categories = Statistics::getCourseCategories();
$content = '';

Expand Down Expand Up @@ -1015,7 +1019,7 @@
//$contract = isset($extraFields['termactivated']) ? $extraFields['termactivated'] : '';
$contract = false;
$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']);
if ($legalId) {
$contract = true;
Expand Down Expand Up @@ -1700,6 +1704,9 @@
case 'logins_by_date':
$content .= Statistics::printLoginsByDate();
break;
case 'lti_tool_lp':
$content .= Statistics::printLtiLearningPath();
break;
}

Display::display_header($tool_name);
Expand Down

0 comments on commit 864e9e2

Please sign in to comment.