Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 64... Línea 64...
64
    }
64
    }
Línea 65... Línea 65...
65
 
65
 
66
    /**
66
    /**
67
     * No identity fields are not shown to student user (no permission to view identity fields).
67
     * No identity fields are not shown to student user (no permission to view identity fields).
68
     */
68
     */
69
    public function test_hidden_siteidentity_fields_no_access() {
69
    public function test_hidden_siteidentity_fields_no_access(): void {
70
        $this->resetAfterTest();
70
        $this->resetAfterTest();
71
        $env = $this->setup_hidden_siteidentity();
71
        $env = $this->setup_hidden_siteidentity();
Línea 72... Línea 72...
72
        $this->setUser($env->student);
72
        $this->setUser($env->student);
Línea 83... Línea 83...
83
    }
83
    }
Línea 84... Línea 84...
84
 
84
 
85
    /**
85
    /**
86
     * Teacher can see students' identity fields only within the course.
86
     * Teacher can see students' identity fields only within the course.
87
     */
87
     */
88
    public function test_hidden_siteidentity_fields_course_only_access() {
88
    public function test_hidden_siteidentity_fields_course_only_access(): void {
89
        $this->resetAfterTest();
89
        $this->resetAfterTest();
90
        $env = $this->setup_hidden_siteidentity();
90
        $env = $this->setup_hidden_siteidentity();
Línea 91... Línea 91...
91
        $this->setUser($env->teacher);
91
        $this->setUser($env->teacher);
Línea 111... Línea 111...
111
    }
111
    }
Línea 112... Línea 112...
112
 
112
 
113
    /**
113
    /**
114
     * Teacher can be prevented from seeing students' identity fields even within the course.
114
     * Teacher can be prevented from seeing students' identity fields even within the course.
115
     */
115
     */
116
    public function test_hidden_siteidentity_fields_course_prevented_access() {
116
    public function test_hidden_siteidentity_fields_course_prevented_access(): void {
117
        $this->resetAfterTest();
117
        $this->resetAfterTest();
118
        $env = $this->setup_hidden_siteidentity();
118
        $env = $this->setup_hidden_siteidentity();
Línea 119... Línea 119...
119
        $this->setUser($env->teacher);
119
        $this->setUser($env->teacher);
Línea 132... Línea 132...
132
    }
132
    }
Línea 133... Línea 133...
133
 
133
 
134
    /**
134
    /**
135
     * Manager can see students' identity fields anywhere.
135
     * Manager can see students' identity fields anywhere.
136
     */
136
     */
137
    public function test_hidden_siteidentity_fields_anywhere_access() {
137
    public function test_hidden_siteidentity_fields_anywhere_access(): void {
138
        $this->resetAfterTest();
138
        $this->resetAfterTest();
139
        $env = $this->setup_hidden_siteidentity();
139
        $env = $this->setup_hidden_siteidentity();
Línea 140... Línea 140...
140
        $this->setUser($env->manager);
140
        $this->setUser($env->manager);
Línea 160... Línea 160...
160
    }
160
    }
Línea 161... Línea 161...
161
 
161
 
162
    /**
162
    /**
163
     * Manager can be prevented from seeing hidden fields outside the course.
163
     * Manager can be prevented from seeing hidden fields outside the course.
164
     */
164
     */
165
    public function test_hidden_siteidentity_fields_schismatic_access() {
165
    public function test_hidden_siteidentity_fields_schismatic_access(): void {
166
        $this->resetAfterTest();
166
        $this->resetAfterTest();
167
        $env = $this->setup_hidden_siteidentity();
167
        $env = $this->setup_hidden_siteidentity();
Línea 168... Línea 168...
168
        $this->setUser($env->manager);
168
        $this->setUser($env->manager);
Línea 194... Línea 194...
194
    }
194
    }
Línea 195... Línea 195...
195
 
195
 
196
    /**
196
    /**
197
     * Two capabilities must be currently set to prevent manager from seeing hidden fields.
197
     * Two capabilities must be currently set to prevent manager from seeing hidden fields.
198
     */
198
     */
199
    public function test_hidden_siteidentity_fields_hard_to_prevent_access() {
199
    public function test_hidden_siteidentity_fields_hard_to_prevent_access(): void {
200
        $this->resetAfterTest();
200
        $this->resetAfterTest();
201
        $env = $this->setup_hidden_siteidentity();
201
        $env = $this->setup_hidden_siteidentity();
Línea 202... Línea 202...
202
        $this->setUser($env->manager);
202
        $this->setUser($env->manager);
Línea 228... Línea 228...
228
     * For legacy reasons, user selectors supported ability to override $CFG->showuseridentity.
228
     * For legacy reasons, user selectors supported ability to override $CFG->showuseridentity.
229
     *
229
     *
230
     * However, this was found as violating the principle of respecting site privacy settings. So the feature has been
230
     * However, this was found as violating the principle of respecting site privacy settings. So the feature has been
231
     * dropped in Moodle 3.6.
231
     * dropped in Moodle 3.6.
232
     */
232
     */
233
    public function test_hidden_siteidentity_fields_explicit_extrafields() {
233
    public function test_hidden_siteidentity_fields_explicit_extrafields(): void {
234
        $this->resetAfterTest();
234
        $this->resetAfterTest();
235
        $env = $this->setup_hidden_siteidentity();
235
        $env = $this->setup_hidden_siteidentity();
236
        $this->setUser($env->manager);
236
        $this->setUser($env->manager);
Línea 237... Línea 237...
237
 
237