Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 213... Línea 213...
213
     * Delete data related to a context and user (if defined).
213
     * Delete data related to a context and user (if defined).
214
     *
214
     *
215
     * @param context $context A context.
215
     * @param context $context A context.
216
     * @param int $userid The user ID.
216
     * @param int $userid The user ID.
217
     */
217
     */
218
    protected static function delete_data(\context $context, int $userid = null) {
218
    protected static function delete_data(\context $context, ?int $userid = null) {
219
        global $DB;
219
        global $DB;
Línea 220... Línea 220...
220
 
220
 
221
        $cohortids = $DB->get_fieldset_select('cohort', 'id', 'contextid = :contextid', ['contextid' => $context->id]);
221
        $cohortids = $DB->get_fieldset_select('cohort', 'id', 'contextid = :contextid', ['contextid' => $context->id]);
222
        foreach ($cohortids as $cohortid) {
222
        foreach ($cohortids as $cohortid) {