Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 409 | Rev 411 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 409 Rev 410
Línea 421... Línea 421...
421
     */
421
     */
422
    const getStatus = (options, answer, type) => {
422
    const getStatus = (options, answer, type) => {
423
        let status;
423
        let status;
424
        status = type == 'multiple' ?
424
        status = type == 'multiple' ?
425
            options.filter((opt) => answer.includes(opt.slug_option) && opt.correct == '1') :
425
            options.filter((opt) => answer.includes(opt.slug_option) && opt.correct == '1') :
426
            options.filter((opt) => opt.slug_option == answer && opt.correct == '1')
426
            options.filter((opt) => opt.slug_option == answer && opt.correct == '1');
427
        return status.length != 0 ? '<font color="green">LABEL_CORRECT</font>' : '<font color="red">LABEL_FAIL</red>';
427
        return status.length != 0 ? '<font color="green">LABEL_CORRECT</font>' : '<font color="red">LABEL_FAIL</red>';
428
    }
428
    }
429
    /**
429
    /**
430
     * Remove Html Tags
430
     * Remove Html Tags
431
     */
431
     */