Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 399 Rev 400
Línea 417... Línea 417...
417
        return removeTags(options.filter((opt) => opt.slug_option == answer)[0].text);
417
        return removeTags(options.filter((opt) => opt.slug_option == answer)[0].text);
418
    }
418
    }
419
    /**
419
    /**
420
     * Get Status
420
     * Get Status
421
     */
421
     */
-
 
422
    const getStatus = (options, answer, type) => {
-
 
423
 
-
 
424
        if(type=='multiple'){
422
    const getStatus = (options, answer) => options.filter((opt) => (opt.slug_option == answer || answer.includes(opt.slug_option)) &&
425
            return options.filter((opt) => ( answer.includes(opt.slug_option) &&
-
 
426
        opt.correct == 1)) ? '<font color="green">LABEL_CORRECT</font>' : '<font color="red">LABEL_FAIL</red>'
-
 
427
        }
-
 
428
 
-
 
429
        return options.filter((opt) => (opt.slug_option == answer &&
423
        opt.correct == 1) ? '<font color="green">LABEL_CORRECT</font>' : '<font color="red">LABEL_FAIL</red>'
430
        opt.correct == 1) ? '<font color="green">LABEL_CORRECT</font>' : '<font color="red">LABEL_FAIL</red>'
-
 
431
 
-
 
432
 
-
 
433
    }
424
    /**
434
    /**
425
     * Remove Html Tags
435
     * Remove Html Tags
426
     */
436
     */
427
    const removeTags = (str) => str.toString().replace(/(<([^>]+)>)/ig, '')
437
    const removeTags = (str) => str.toString().replace(/(<([^>]+)>)/ig, '')
428
    /**
438
    /**