Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 31... Línea 31...
31
 * @package    core
31
 * @package    core
32
 * @category   output
32
 * @category   output
33
 * @copyright  2021 Adrian Greeve <adrian@moodle.com>
33
 * @copyright  2021 Adrian Greeve <adrian@moodle.com>
34
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
35
 */
35
 */
36
class language_menu implements \renderable, \templatable {
36
class language_menu implements renderable, templatable {
37
 
-
 
38
    /** @var \moodle_page $page the moodle page that the languague menu belongs to */
37
    /** @var \moodle_page $page the moodle page that the languague menu belongs to */
39
    protected $page;
38
    protected $page;
Línea 40... Línea 39...
40
 
39
 
41
    /** @var string current language code */
40
    /** @var string current language code */
Línea 65... Línea 64...
65
 
64
 
66
        if (empty($CFG->langmenu)) {
65
        if (empty($CFG->langmenu)) {
67
            return false;
66
            return false;
Línea 68... Línea 67...
68
        }
67
        }
69
 
68
 
70
        if ($this->page->course != SITEID and !empty($this->page->course->lang)) {
69
        if ($this->page->course != SITEID && !empty($this->page->course->lang)) {
71
            // Do not show lang menu if language forced.
70
            // Do not show lang menu if language forced.
Línea 72... Línea 71...
72
            return false;
71
            return false;
Línea 173... Línea 172...
173
        $singleselect = new \single_select($this->page->url, 'lang', $this->langs, $this->currentlang, null);
172
        $singleselect = new \single_select($this->page->url, 'lang', $this->langs, $this->currentlang, null);
174
        $singleselect->label = get_accesshide(\get_string('language'));
173
        $singleselect->label = get_accesshide(\get_string('language'));
175
        $singleselect->class = 'langmenu';
174
        $singleselect->class = 'langmenu';
176
        return $singleselect->export_for_template($output);
175
        return $singleselect->export_for_template($output);
177
    }
176
    }
178
 
-
 
179
}
177
}