Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 105... Línea 105...
105
        }
105
        }
106
    }
106
    }
107
}
107
}
Línea 108... Línea 108...
108
 
108
 
-
 
109
/**
-
 
110
 * Any plugin typically an admin tool can add new bulk user actions
-
 
111
 *
-
 
112
 * @return array
-
 
113
 */
-
 
114
function tool_mfa_bulk_user_actions(): array {
-
 
115
    if (!has_capability('moodle/site:config', context_system::instance())) {
-
 
116
        return [];
-
 
117
    }
-
 
118
    return [
-
 
119
        'tool_mfa_reset_factors' => new action_link(
-
 
120
            new moodle_url('/admin/tool/mfa/reset_factor.php'),
-
 
121
            get_string('resetfactor', 'tool_mfa'),
-
 
122
        ),
-
 
123
    ];
-
 
124
}
-
 
125
 
109
/**
126
/**
110
 * Serves any files for the guidance page.
127
 * Serves any files for the guidance page.
111
 *
128
 *
112
 * @param stdClass $course
129
 * @param stdClass|null $course
113
 * @param stdClass $cm
130
 * @param stdClass|null $cm
114
 * @param context $context
131
 * @param context $context
115
 * @param string $filearea
132
 * @param string $filearea
116
 * @param array $args
133
 * @param array $args
117
 * @param bool $forcedownload
134
 * @param bool $forcedownload
118
 * @param array $options
135
 * @param array $options
119
 * @return bool
136
 * @return bool
120
 */
137
 */
121
function tool_mfa_pluginfile(stdClass $course, stdClass $cm, context $context, string $filearea,
138
function tool_mfa_pluginfile(stdClass|null $course, stdClass|null $cm, context $context, string $filearea,
122
    array $args, bool $forcedownload, array $options = []): bool {
139
    array $args, bool $forcedownload, array $options = []): bool {
123
    // Hardcode to only send guidance files from the top level.
140
    // Hardcode to only send guidance files from the top level.
124
    $fs = get_file_storage();
141
    $fs = get_file_storage();
125
    $file = $fs->get_file(
142
    $file = $fs->get_file(