Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 44... Línea 44...
44
     * @var array $exclude Exclude a list of cohorts from the list (e.g. the current cohort).
44
     * @var array $exclude Exclude a list of cohorts from the list (e.g. the current cohort).
45
     */
45
     */
46
    protected $exclude = array();
46
    protected $exclude = array();
Línea 47... Línea 47...
47
 
47
 
-
 
48
    /**
-
 
49
     * @var string $includes One of self/parents/all
-
 
50
     */
-
 
51
    protected $includes = 'parents';
-
 
52
 
48
    /**
53
    /**
49
     * @var int $contextid The context id to fetch cohorts in.
54
     * @var int $contextid The context id to fetch cohorts in.
50
     */
55
     */
Línea 51... Línea 56...
51
    protected $contextid = 0;
56
    protected $contextid = 0;
Línea 84... Línea 89...
84
            $this->exclude = $options['exclude'];
89
            $this->exclude = $options['exclude'];
85
            if (!is_array($this->exclude)) {
90
            if (!is_array($this->exclude)) {
86
                $this->exclude = array($this->exclude);
91
                $this->exclude = array($this->exclude);
87
            }
92
            }
88
        }
93
        }
-
 
94
        if (isset($options['includes'])) {
-
 
95
            $this->includes = $options['includes'];
-
 
96
        }
89
        if (isset($options['requiredcapabilities'])) {
97
        if (isset($options['requiredcapabilities'])) {
90
            $this->requiredcapabilities = $options['requiredcapabilities'];
98
            $this->requiredcapabilities = $options['requiredcapabilities'];
91
        }
99
        }
Línea 92... Línea 100...
92
 
100
 
93
        $validattributes = array(
101
        $validattributes = array(
94
            'ajax' => 'core/form-cohort-selector',
102
            'ajax' => 'core/form-cohort-selector',
-
 
103
            'data-exclude' => implode(',', $this->exclude),
95
            'data-exclude' => implode(',', $this->exclude),
104
            'data-includes' => $this->includes,
96
            'data-contextid' => (int)$this->contextid
105
            'data-contextid' => (int)$this->contextid
97
        );
106
        );
98
        if ($this->multiple) {
107
        if ($this->multiple) {
99
            $validattributes['multiple'] = 'multiple';
108
            $validattributes['multiple'] = 'multiple';