Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 343... Línea 343...
343
            handlers: [],
343
            handlers: [],
344
        };
344
        };
345
        let hasDefault = false;
345
        let hasDefault = false;
346
        fileHandlers.forEach((handler, index) => {
346
        fileHandlers.forEach((handler, index) => {
347
            const isDefault = (defaultModule == handler.module);
347
            const isDefault = (defaultModule == handler.module);
-
 
348
            const optionNumber = index + 1;
348
            data.handlers.push({
349
            data.handlers.push({
349
                ...handler,
350
                ...handler,
350
                selected: isDefault,
351
                selected: isDefault,
351
                labelid: `fileuploader_${data.uploadid}`,
352
                labelid: `fileuploader_${data.uploadid}_${optionNumber}`,
352
                value: index,
353
                value: index,
353
            });
354
            });
354
            hasDefault = hasDefault || isDefault;
355
            hasDefault = hasDefault || isDefault;
355
        });
356
        });
356
        if (!hasDefault && data.handlers.length > 0) {
357
        if (!hasDefault && data.handlers.length > 0) {