Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 41... Línea 41...
41
 
41
 
42
    protected function get_javascript_strings() {
42
    protected function get_javascript_strings() {
43
        return array('anygroup');
43
        return array('anygroup');
Línea 44... Línea 44...
44
    }
44
    }
45
 
45
 
46
    protected function get_javascript_init_params($course, \cm_info $cm = null,
46
    protected function get_javascript_init_params($course, ?\cm_info $cm = null,
47
            \section_info $section = null) {
47
            ?\section_info $section = null) {
Línea 48... Línea 48...
48
        // Get all groups for course.
48
        // Get all groups for course.
49
        $groups = $this->get_all_groups($course->id);
49
        $groups = $this->get_all_groups($course->id);
Línea 70... Línea 70...
70
    protected function get_all_groups($courseid) {
70
    protected function get_all_groups($courseid) {
71
        global $CFG;
71
        global $CFG;
72
        require_once($CFG->libdir . '/grouplib.php');
72
        require_once($CFG->libdir . '/grouplib.php');
Línea 73... Línea 73...
73
 
73
 
74
        if ($courseid != $this->allgroupscourseid) {
74
        if ($courseid != $this->allgroupscourseid) {
75
            $this->allgroups = groups_get_all_groups($courseid, 0, 0, 'g.id, g.name');
75
            $this->allgroups = groups_get_all_groups($courseid, 0, 0, 'g.id, g.name, g.visibility');
76
            $this->allgroupscourseid = $courseid;
76
            $this->allgroupscourseid = $courseid;
77
        }
77
        }
78
        return $this->allgroups;
78
        return $this->allgroups;
Línea 79... Línea 79...
79
    }
79
    }
80
 
80
 
81
    protected function allow_add($course, \cm_info $cm = null,
81
    protected function allow_add($course, ?\cm_info $cm = null,
Línea 82... Línea 82...
82
            \section_info $section = null) {
82
            ?\section_info $section = null) {
83
        global $CFG;
83
        global $CFG;
84
 
84