Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 115... Línea 115...
115
        if (!is_null($sectionreturn)) {
115
        if (!is_null($sectionreturn)) {
116
            $url->param('sectionid', $format->get_sectionid());
116
            $url->param('sectionid', $format->get_sectionid());
117
        }
117
        }
Línea 118... Línea 118...
118
 
118
 
-
 
119
        $highlightoff = get_string('highlightoff');
-
 
120
        $highlightofficon = 'i/marked';
119
        $highlightoff = get_string('highlightoff');
121
 
-
 
122
        $highlighton = get_string('highlight');
Línea 120... Línea 123...
120
        $highlighton = get_string('highlight');
123
        $highlightonicon = 'i/marker';
121
 
124
 
122
        if ($course->marker == $section->section) {  // Show the "light globe" on/off.
125
        if ($course->marker == $section->section) {  // Show the "light globe" on/off.
123
            $url->param('marker', 0);
126
            $url->param('marker', 0);
124
            $result = [
127
            $result = [
125
                'url' => $url,
128
                'url' => $url,
126
                'icon' => 'i/marked',
129
                'icon' => $highlightofficon,
127
                'name' => $highlightoff,
130
                'name' => $highlightoff,
128
                'pixattr' => ['class' => ''],
131
                'pixattr' => ['class' => ''],
129
                'attr' => [
132
                'attr' => [
130
                    'class' => 'editing_highlight',
133
                    'class' => 'editing_highlight',
131
                    'data-action' => 'sectionUnhighlight',
134
                    'data-action' => 'sectionUnhighlight',
-
 
135
                    'data-sectionreturn' => $sectionreturn,
132
                    'data-sectionreturn' => $sectionreturn,
136
                    'data-id' => $section->id,
133
                    'data-id' => $section->id,
137
                    'data-icon' => $highlightofficon,
134
                    'data-swapname' => $highlighton,
138
                    'data-swapname' => $highlighton,
135
                    'data-swapicon' => 'i/marker',
139
                    'data-swapicon' => $highlightonicon,
136
                ],
140
                ],
137
            ];
141
            ];
138
        } else {
142
        } else {
139
            $url->param('marker', $section->section);
143
            $url->param('marker', $section->section);
140
            $result = [
144
            $result = [
141
                'url' => $url,
145
                'url' => $url,
142
                'icon' => 'i/marker',
146
                'icon' => $highlightonicon,
143
                'name' => $highlighton,
147
                'name' => $highlighton,
144
                'pixattr' => ['class' => ''],
148
                'pixattr' => ['class' => ''],
145
                'attr' => [
149
                'attr' => [
146
                    'class' => 'editing_highlight',
150
                    'class' => 'editing_highlight',
147
                    'data-action' => 'sectionHighlight',
151
                    'data-action' => 'sectionHighlight',
-
 
152
                    'data-sectionreturn' => $sectionreturn,
148
                    'data-sectionreturn' => $sectionreturn,
153
                    'data-id' => $section->id,
149
                    'data-id' => $section->id,
154
                    'data-icon' => $highlightonicon,
150
                    'data-swapname' => $highlightoff,
155
                    'data-swapname' => $highlightoff,
151
                    'data-swapicon' => 'i/marked',
156
                    'data-swapicon' => $highlightofficon,
152
                ],
157
                ],
153
            ];
158
            ];
154
        }
159
        }