File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1616
1717/**
1818 * Course module navigation block main controller
19+ *
1920 * @package block_course_modulenavigation
2021 * @copyright 2019 Pimenko <contact@pimenko.com> <pimenko.com>
2122 * @author Sylvain Revneu | Jordan Kesraoui | Pimenko
2829
2930/**
3031 * Privacy Subsystem for block_course_modulenavigation implementing null_provider.
32+ *
3133 * @copyright 2019 Pimenko <contact@pimenko.com> <pimenko.com>
3234 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3335 */
@@ -37,9 +39,10 @@ class provider implements // This plugin does not store any personal user data.
3739 /**
3840 * Get the language string identifier with the component's language
3941 * file to explain why this plugin stores no data.
42+ *
4043 * @return string
4144 */
42- public static function get_reason () : string {
45+ public static function get_reason (): string {
4346 return 'privacy:null_reason ' ;
4447 }
4548}
Original file line number Diff line number Diff line change 3131 'contextlevel ' => CONTEXT_BLOCK ,
3232 'archetypes ' => [
3333 'editingteacher ' => CAP_ALLOW ,
34- 'manager ' => CAP_ALLOW
34+ 'manager ' => CAP_ALLOW ,
3535 ],
3636
37- 'clonepermissionsfrom ' => 'moodle/site:manageblocks '
37+ 'clonepermissionsfrom ' => 'moodle/site:manageblocks ' ,
3838 ],
3939];
Original file line number Diff line number Diff line change 3232$ string ['course_modulenavigation:addinstance ' ] = 'Add a new course contents block ' ;
3333$ string ['notusingsections ' ] = 'This course format does not use sections. ' ;
3434$ string ['pluginname ' ] = 'Course Module Navigation ' ;
35+ $ string ['privacy:null_reason ' ] = 'The Blog Course Module Navigation block only shows data stored in other locations ' ;
3536$ string ['toggleclickontitle ' ] = 'Clicking on the title ' ;
3637$ string ['toggleclickontitle_desc ' ] = "'Displays the menu' or 'Goes to that page'. " ;
3738$ string ['toggleclickontitle_menu ' ] = 'Displays the menu ' ;
3839$ string ['toggleclickontitle_page ' ] = 'Goes to that page ' ;
39- $ string ['toggleshowlabels ' ] = 'Show labels ' ;
40- $ string ['toggleshowlabels_desc ' ] = 'Choose whether to display labels or not ' ;
4140$ string ['togglecollapse ' ] = 'Collapse tabs ' ;
4241$ string ['togglecollapse_desc ' ] = 'Choose whether to display all tabs not collapsed ' ;
42+ $ string ['toggleshowlabels ' ] = 'Show labels ' ;
43+ $ string ['toggleshowlabels_desc ' ] = 'Choose whether to display labels or not ' ;
4344$ string ['toggletitles ' ] = 'Show only titles ' ;
4445$ string ['toggletitles_desc ' ] = 'Choose whether to display only titles or titles and content ' ;
45- $ string ['privacy:null_reason ' ] = 'The Blog Course Module Navigation block only shows data stored in other locations ' ;
Original file line number Diff line number Diff line change 3434class block_course_modulenavigation_nav_renderer extends plugin_renderer_base {
3535
3636 /**
37+ * Renders navigation based on the provided template configuration.
3738 *
38- * Render HTML template.
39+ * @param object $ template The template object containing configuration settings .
3940 *
40- * @param $template
41- * @return bool|string
42- * @throws moodle_exception
41+ * @return string Rendered navigation content based on the template configuration.
4342 */
4443 public function render_nav ($ template ) {
4544 if (isset ($ template ->config ->onesection ) && ($ template ->config ->onesection == 1 )) {
Original file line number Diff line number Diff line change 7171 $ choices = [
7272 1 => new lang_string ('no ' ),
7373 // No.
74- 2 => new lang_string ('yes ' )
74+ 2 => new lang_string ('yes ' ),
7575 // Yes.
7676 ];
7777 $ settings ->add (
9898 $ choices = [
9999 1 => new lang_string ('no ' ),
100100 // No.
101- 2 => new lang_string ('yes ' )
101+ 2 => new lang_string ('yes ' ),
102102 // Yes.
103103 ];
104104 $ settings ->add (
125125 $ choices = [
126126 1 => new lang_string ('no ' ),
127127 // No.
128- 2 => new lang_string ('yes ' )
128+ 2 => new lang_string ('yes ' ),
129129 // Yes.
130130 ];
131131 $ settings ->add (
Original file line number Diff line number Diff line change 9393 <div class =" section-body" >
9494 <ul class =" activities" >
9595 { {#modules} }
96- { {^onlytitles} }
97- <li >
98- <a href =" { { { url} } } " class =" { { active} } { { #label} } modulenavigationlabel{ { /label} } " onclick =" { { { onclick} } } " >
99- { {#completionon} }
100- <div class =" completionbox" >
101- <div class =" completioncheck { { completeclass} } " >
96+ { {^issubsection} }
97+ { {^onlytitles} }
98+ <li >
99+ <a href =" { { { url} } } " class =" { { active} } { { #label} } modulenavigationlabel{ { /label} } " onclick =" { { { onclick} } } " >
100+ { {#completionon} }
101+ <div class =" completionbox" >
102+ <div class =" completioncheck { { completeclass} } " >
103+ </div >
102104 </div >
105+ { {/completionon} }
106+ <div class =" activityname" >
107+ { {{name} }}
103108 </div >
104- { {/completionon } }
105- < div class = " activityname " >
106- { {{name } }}
107- </ div >
108- </ a >
109- </ li >
110- { {/onlytitles } }
109+ </ a >
110+ </ li >
111+ { {/onlytitles } }
112+ { {/issubsection } }
113+ { {#issubsection } }
114+ { { > block_course_modulenavigation/subsection } }
115+ { {/issubsection } }
111116 { {/modules} }
112117 </ul >
113118 </div >
Original file line number Diff line number Diff line change 1+ { {#subsection} }
2+ <div class =" section section-default p-1" >
3+ <div class =" module-navigation-section-heading" role =" tab" id =" heading{ { number} } " >
4+ <div class =" section-title" >
5+ <ul class =" allpagination" >
6+ <li class =" allsectionnames" >
7+ { {#collapse} }
8+ <a href =" { { { url} } } " >{ {{title} }}</a >
9+ { {/collapse} }
10+ { {^collapse} }
11+ { {#onlytitles} }
12+ <a href =" { { { url} } } " >{ {{title} }}</a >
13+ { {/onlytitles} }
14+ { {^onlytitles} }
15+ <a data-toggle =" collapse" data-parent =" #accordion" href =" #collapse{ { number} } "
16+ aria-expanded =" true" aria-controls =" collapse{ { number} } " >{ {{title} }}</a >
17+ { {/onlytitles} }
18+ { {/collapse} }
19+ </li >
20+ { {#collapse} }
21+ <li class =" arrowaccordion" >
22+ { {#hasmodules} }
23+ <a class =" expand-arrow" role =" button" data-toggle =" collapse"
24+ data-parent =" #accordion" href =" #collapse{ { number} } " aria-expanded =" true"
25+ aria-controls =" collapse{ { number} } " >
26+ </a >
27+ { {/hasmodules} }
28+ </li >
29+ { {/collapse} }
30+ </ul >
31+ </div >
32+ </div >
33+ <div id =" collapse{ { number} } " class =" section-collapse collapse { { #selected} } show{ { /selected} } "
34+ role =" tabsection" aria-labelledby =" heading{ { number} } " >
35+ <div class =" section-body" >
36+ <ul class =" activities" >
37+ { {#modules} }
38+ { {^onlytitles} }
39+ <li >
40+ <a href =" { { { url} } } " class =" { { active} } { { #label} } modulenavigationlabel{ { /label} } " onclick =" { { { onclick} } } " >
41+ { {#completionon} }
42+ <div class =" completionbox" >
43+ <div class =" completioncheck { { completeclass} } " >
44+ </div >
45+ </div >
46+ { {/completionon} }
47+ <div class =" activityname" >
48+ { {{name} }}
49+ </div >
50+ </a >
51+ </li >
52+ { {/onlytitles} }
53+ { {/modules} }
54+ </ul >
55+ </div >
56+ </div >
57+ </div >
58+ { {/subsection} }
Original file line number Diff line number Diff line change 2424defined ('MOODLE_INTERNAL ' ) || die ();
2525
2626$ plugin ->component = 'block_course_modulenavigation ' ;
27- $ plugin ->release = 'v4.6.3 ' ;
28- $ plugin ->version = 2023101700 ;
29- $ plugin ->requires = 2022041905 ; // Moodle 4.0.5 and above.
27+ $ plugin ->release = 'v4.7.1 ' ;
28+ $ plugin ->version = 2024101401 ; // YYYYMMDD.
29+ $ plugin ->requires = 2024100100 ; // Moodle 4.0.5 and above.
3030$ plugin ->maturity = MATURITY_STABLE ;
You can’t perform that action at this time.
0 commit comments