From 1bb85a19a637095164e5637e62aa5f259efbaa0e Mon Sep 17 00:00:00 2001 From: Gustavo Bazzo Date: Wed, 29 Jan 2025 14:14:36 -0500 Subject: [PATCH] Add link to recit apis --- src/classes/local/CtrlLayout.php | 4 ++++ src/lang/en/theme_recit2.php | 3 ++- src/lang/fr/theme_recit2.php | 3 ++- src/templates/recit/navbar_top.mustache | 3 +++ src/version.php | 2 +- sync.ps1 | 1 + 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/classes/local/CtrlLayout.php b/src/classes/local/CtrlLayout.php index 35633c6..12fcd02 100644 --- a/src/classes/local/CtrlLayout.php +++ b/src/classes/local/CtrlLayout.php @@ -473,6 +473,10 @@ public static function get_user_menu($page, $user) { self::add_nav_item($result, "mycourses", "fa-graduation-cap", "mycourses", $CFG->wwwroot . "/my/courses.php"); self::add_nav_item($result, "mymoodle", "fa-tachometer", "dashboard", $CFG->wwwroot . "/my/", get_string('mymoodle', 'my')); + if(is_dir($CFG->dirroot . "/admin/tool/recitapis")){ + self::add_nav_item($result, "recitapis", "fa-connectdevelop", null, $CFG->wwwroot . "/admin/tool/recitapis/view.php", get_string("tool_recitapis", "theme_recit2")); + } + if($COURSE->id > 1){ $roles = ThemeUtils::getUserRoles($COURSE->id, $USER->id); diff --git a/src/lang/en/theme_recit2.php b/src/lang/en/theme_recit2.php index f722e12..54a830b 100644 --- a/src/lang/en/theme_recit2.php +++ b/src/lang/en/theme_recit2.php @@ -160,4 +160,5 @@ $string['hide_restricted_section'] = "Do not display sections that have access restrictions"; $string['hide_restricted_section_help'] = "When checked, unavailable sections are not displayed in the menu."; $string['prev_section'] = 'Previous section'; -$string['next_section'] = 'Next section'; \ No newline at end of file +$string['next_section'] = 'Next section'; +$string['tool_recitapis'] = 'RÉCIT APIs'; \ No newline at end of file diff --git a/src/lang/fr/theme_recit2.php b/src/lang/fr/theme_recit2.php index c2d9ea7..9cd2ed0 100644 --- a/src/lang/fr/theme_recit2.php +++ b/src/lang/fr/theme_recit2.php @@ -161,4 +161,5 @@ $string['hide_restricted_section'] = "Ne pas afficher les sections qui possèdent des restrictions d'accès"; $string['hide_restricted_section_help'] = "Lorsque coché, les sections non disponibles ne sont pas affichées dans le menu."; $string['prev_section'] = 'Section précédente'; -$string['next_section'] = 'Section suivante'; \ No newline at end of file +$string['next_section'] = 'Section suivante'; +$string['tool_recitapis'] = 'RÉCIT APIs'; \ No newline at end of file diff --git a/src/templates/recit/navbar_top.mustache b/src/templates/recit/navbar_top.mustache index 1622d99..cbf5db6 100644 --- a/src/templates/recit/navbar_top.mustache +++ b/src/templates/recit/navbar_top.mustache @@ -157,6 +157,9 @@ {{#usermenu.mymoodle.url}} {{usermenu.mymoodle.title}} {{/usermenu.mymoodle.url}} + {{#usermenu.recitapis.url}} + {{usermenu.recitapis.title}} + {{/usermenu.recitapis.url}} {{#usermenu.participants.url}} {{usermenu.participants.title}} diff --git a/src/version.php b/src/version.php index 2fcb5bb..18cdd53 100644 --- a/src/version.php +++ b/src/version.php @@ -35,7 +35,7 @@ $plugin->component = 'theme_recit2'; // This is the named version. -$plugin->release = 'v3.2.5-stable'; +$plugin->release = 'v3.2.6-stable'; $plugin->supported = [400, 403]; // Moodle 4.0.x, are supported. // This is a stable release. $plugin->maturity = MATURITY_STABLE; \ No newline at end of file diff --git a/sync.ps1 b/sync.ps1 index 8cee632..634138b 100644 --- a/sync.ps1 +++ b/sync.ps1 @@ -1,5 +1,6 @@ $from = "moodle-theme_recit/src/*" $to = "shared/recitfad/theme/recit2/" +$source = "./src"; try { . ("..\sync\watcher.ps1")