Index: lams_central/web/qb/authoring/addessay.jsp =================================================================== diff -u -r4e0dad7a9cb85a9df151fdf85de8022c8dc84f69 -r6bab11b98a1dfdcebfb7e11b8dcfab3128a2ff83 --- lams_central/web/qb/authoring/addessay.jsp (.../addessay.jsp) (revision 4e0dad7a9cb85a9df151fdf85de8022c8dc84f69) +++ lams_central/web/qb/authoring/addessay.jsp (.../addessay.jsp) (revision 6bab11b98a1dfdcebfb7e11b8dcfab3128a2ff83) @@ -103,6 +103,24 @@ minimumWordsSpinner.spinner( "disable" ); } }); + + $('#codeStyle').change(function(){ + let codeStyle = $(this).val(); + + // if code style is selected, there are no restrictions on number of words and no usage of CKEditor + if (codeStyle > 0) { + $("#min-words-limit-checkbox, #max-words-limit-checkbox, #allow-rich-editor").prop({ + 'checked' : false, + 'disabled': true + }); + maximumWordsSpinner.spinner('disable'); + minimumWordsSpinner.spinner('disable'); + } else { + $("#min-words-limit-checkbox, #max-words-limit-checkbox, #allow-rich-editor").prop({ + 'disabled': false + }); + } + }).change(); }); @@ -181,7 +199,22 @@ - + +