Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 66... Línea 66...
66
 
66
 
67
        $format = $this->format;
67
        $format = $this->format;
68
        $section = $this->section;
68
        $section = $this->section;
69
        $cm = $this->cm;
69
        $cm = $this->cm;
-
 
70
        $course = $format->get_course();
Línea 70... Línea 71...
70
        $course = $format->get_course();
71
        $delegatedsectioninfo = $cm->get_delegated_section_info();
71
 
72
 
72
        $data = (object)[
73
        $data = (object)[
73
            'id' => $cm->id,
74
            'id' => $cm->id,
Línea 83... Línea 84...
83
            'indent' => ($format->uses_indentation()) ? $cm->indent : 0,
84
            'indent' => ($format->uses_indentation()) ? $cm->indent : 0,
84
            'groupmode' => $cm->groupmode,
85
            'groupmode' => $cm->groupmode,
85
            'module' => $cm->modname,
86
            'module' => $cm->modname,
86
            'plugin' => 'mod_' . $cm->modname,
87
            'plugin' => 'mod_' . $cm->modname,
87
            // Activities with delegate section has some restriction to prevent structure loops.
88
            // Activities with delegate section has some restriction to prevent structure loops.
88
            'delegatesection' => sectiondelegate::has_delegate_class('mod_'.$cm->modname),
89
            'hasdelegatedsection' => !empty($delegatedsectioninfo),
89
        ];
90
        ];
Línea -... Línea 91...
-
 
91
 
-
 
92
        if (!empty($delegatedsectioninfo)) {
-
 
93
            $data->delegatesectionid = $delegatedsectioninfo->id;
-
 
94
        }
90
 
95
 
91
        // Check the user access type to this cm.
96
        // Check the user access type to this cm.
92
        $info = new info_module($cm);
97
        $info = new info_module($cm);
Línea 93... Línea 98...
93
        $data->accessvisible = ($data->visible && $info->is_available_for_all());
98
        $data->accessvisible = ($data->visible && $info->is_available_for_all());