Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 408 Rev 409
Línea 418... Línea 418...
418
    }
418
    }
419
    /**
419
    /**
420
     * Get Status
420
     * Get Status
421
     */
421
     */
422
    const getStatus = (options, answer, type) => {
422
    const getStatus = (options, answer, type) => {
423
 
-
 
424
        let status;
423
        let status;
425
 
-
 
426
     status = type=='multiple' ?
424
        status = type == 'multiple' ?
427
           status = options.filter((opt) => answer.includes(opt.slug_option) && opt.correct == '1')
425
            options.filter((opt) => answer.includes(opt.slug_option) && opt.correct == '1') :
428
     :
-
 
429
            options.filter((opt) => opt.slug_option == answer && opt.correct == '1')
426
            options.filter((opt) => opt.slug_option == answer && opt.correct == '1')
430
        
-
 
431
 
-
 
432
        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>';
433
    }
428
    }
434
    /**
429
    /**
435
     * Remove Html Tags
430
     * Remove Html Tags
436
     */
431
     */
437
    const removeTags = (str) => str.toString().replace(/(<([^>]+)>)/ig, '')
432
    const removeTags = (str) => str.toString().replace(/(<([^>]+)>)/ig, '')
Línea 451... Línea 446...
451
     * Clicked refresh button
446
     * Clicked refresh button
452
     */
447
     */
453
    $('button.btn-refresh').click(function(e) {
448
    $('button.btn-refresh').click(function(e) {
454
        tableForm.fnDraw();
449
        tableForm.fnDraw();
455
    });
450
    });
456
    
-
 
457
});
451
});
458
JS;
452
JS;
459
$this->inlineScript()->captureEnd();
453
$this->inlineScript()->captureEnd();
460
?>
454
?>