avaloq/static/js/reviewSlider.js
// take care of index our of range when questions have different number of conde enties
take care of index our of range when questions have different number of conde enties
take care of index our of range when questions have different number of conde enties
function updateEditor() {
    if (document.getElementById('demo').innerText > slider.max){
        document.getElementById('demo').innerText = slider.max;
    }
    if (question1) {
        editor.setValue(code_entry0[slider.value].code);
        document.getElementById("language").innerHTML = "Language: " + code_entry0[slider.value].language;
    } else {
        editor.setValue(code_entry1[slider.value].code);
        document.getElementById("language").innerHTML = "Language: " + code_entry1[slider.value].language;
    }
}
function updateEditor ( ) { if ( document . getElementById ( 'demo' ) . innerText > slider . max ) { document . getElementById ( 'demo' ) . innerText = slider . max ; } if ( question1 ) { editor . setValue ( code_entry0 [ slider . value ] . code ) ; document . getElementById ( "language" ) . innerHTML = "Language: " + code_entry0 [ slider . value ] . language ; } else { editor . setValue ( code_entry1 [ slider . value ] . code ) ; document . getElementById ( "language" ) . innerHTML = "Language: " + code_entry1 [ slider . value ] . language ; } }
take care of index our of range when questions have different number of conde enties
take care of index our of range when questions have different number of conde enties
// check if slider value is displaying the correct value