Skip to content

Commit 6666ca1

Browse files
committed
Bug fixes - LT-368
1 parent a50f8b6 commit 6666ca1

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ function local_learningtools_myprofile_navigation(tree $tree, $user, $iscurrentu
5858
function local_learningtools_extend_settings_navigation($settingnav, $context) {
5959
global $PAGE, $CFG;
6060
$context = context_system::instance();
61-
if (empty($PAGE->course) || empty($PAGE->context) || $PAGE->context->contextlevel !== CONTEXT_COURSE) {
62-
return;
63-
}
61+
6462
$ltoolsjs = [];
6563
// Content of fab button html.
66-
$fabbuttonhtml = json_encode(local_learningtools_get_learningtools_info());
64+
$learningtoolsinfo = local_learningtools_get_learningtools_info();
65+
$fabbuttonhtml = !empty($learningtoolsinfo) ? json_encode($learningtoolsinfo) : false;
66+
if ($fabbuttonhtml === false) {
67+
return;
68+
}
6769
$ltoolsjs['disappertimenotify'] = get_config('local_learningtools', 'notificationdisapper');
6870
$PAGE->requires->data_for_js('ltools', $ltoolsjs);
6971
$PAGE->requires->data_for_js('fabbuttonhtml', $fabbuttonhtml, true);

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
defined('MOODLE_INTERNAL') || die();
2525

2626
$plugin->component = 'local_learningtools';
27-
$plugin->version = 2025051503;
27+
$plugin->version = 2025111200;
2828
$plugin->release = 'v1.3';
2929
$plugin->requires = 2022041900; // Moodle 4.0.
3030
$plugin->maturity = MATURITY_STABLE;

0 commit comments

Comments
 (0)