app-dev/app/static/js/unicode.js
/* Hides and shows certain form elements rendering
based on the type of question being entered in our
edit-test view. Additionally sets the question-type
HiddenField based on the type of question selected */
Hides and shows certain form elements rendering
based on the type of question being entered in our
edit-test view. Additionally sets the question-type
HiddenField based on the type of question selected
Hides and shows certain form elements rendering based on the type of question being entered in our edit - test view . Additionally sets the question - type HiddenField based on the type of question selected
function newQuestionSelector(qType) {
    if (qType == 1) { 
        $('#new-question-mcq').hide();
        $('#new-question-solution').show();
        $('#solution-textbox').show();
        $('#solution-mcq').hide()
        $('#question-type').attr('value', 1);
        $('#new-question-form #question-description').css('height', '190px');
    }
    else if (qType == 2) { 
        $('#new-question-mcq').show();
        $('#new-question-solution').show();
        $('#solution-textbox').hide();
        $('#solution-mcq').show()
        $('#question-type').attr('value', 2);
        $('#new-question-form #question-description').css('height', '50px');
    }
    else if (qType == 3) { 
        $('#new-question-mcq').hide();
        $('#new-question-solution').hide();
        $('#question-type').attr('value', 3);
        $('#new-question-form #question-description').css('height', '280px');
    }
}
function newQuestionSelector ( qType ) { if ( qType == 1 ) { $ ( '#new-question-mcq' ) . hide ( ) ; $ ( '#new-question-solution' ) . show ( ) ; $ ( '#solution-textbox' ) . show ( ) ; $ ( '#solution-mcq' ) . hide ( ) $ ( '#question-type' ) . attr ( 'value' , 1 ) ; $ ( '#new-question-form #question-description' ) . css ( 'height' , '190px' ) ; } else if ( qType == 2 ) { $ ( '#new-question-mcq' ) . show ( ) ; $ ( '#new-question-solution' ) . show ( ) ; $ ( '#solution-textbox' ) . hide ( ) ; $ ( '#solution-mcq' ) . show ( ) $ ( '#question-type' ) . attr ( 'value' , 2 ) ; $ ( '#new-question-form #question-description' ) . css ( 'height' , '50px' ) ; } else if ( qType == 3 ) { $ ( '#new-question-mcq' ) . hide ( ) ; $ ( '#new-question-solution' ) . hide ( ) ; $ ( '#question-type' ) . attr ( 'value' , 3 ) ; $ ( '#new-question-form #question-description' ) . css ( 'height' , '280px' ) ; } }
Hides and shows certain form elements rendering
based on the type of question being entered in our
edit-test view.
Hides and shows certain form elements rendering based on the type of question being entered in our edit - test view .
// If code-output question // If MCQ question // If code-submission question