Steps to reproduce bug -
Generate options from checkbox.Students, Teams, Instructors). (Optional)Generate options from checkbox enabled, but the option selecting disabled. Input fields for manual options input are visible.Justification - If the instructor doesn't notice this and fills in the options manually and saves the question, then the manually added options are not considered, Generate options from gets saved.
Expected behavior - Drop-down to select Generate options from must be enabled (preferably with the option if selected in step 3). Input fields for manual options input should be hidden.
Scope of issue - This bug exists for MCQ and MSQ question types. Add fixes for both.
I'll be working on this.
Edit:
@VamsiSangam Will be working on it later in the day. Figured out the impacted files.
Btw, npm run build minified the JS files. package.json has an npm run build:src but I don't think that will unminify it. What am I missing here?
@ahsanbagwan You can remove this line and re-run npm run build to get non-minified files. More info: https://github.com/TEAMMATES/teammates/issues/7532#issuecomment-309023124
@whipermr5 That helped to add breakpoints in Chrome developer tools. Thanks a bunch.
On the issue front, while debugging the if conditional here selects the else block once the question is cancelled and same type is selected from the new dropdown.
~I'm wondering whether the selector mentioned here has a typo~. ~Is it so?~
Edit: Looks like the problem is indeed localised to the above pointed lines.
I will be changing the condition in line to and test it:
$('[id^=generate][id$=OptionsCheckbox-${NEW_QUESTION}]').prop('checked')
What are your thoughts?
@VamsiSangam @ahsanbagwan @whipermr5 can i work on this issue?
Is anyone working on this? Or can I take up this issue?
@tshradheya I am in no authority to say this but, IMO, you have 5 open PRs, you should wait for at least 1-2 of them to get merged before taking up new issues as, if you open PRs for 6-7 issues at the same time and simultaneously work on them, then it might be difficult for other developers to find a issue to work on.
@whipermr5 @VamsiSangam @damithc I suppose bug is there not only for MCQ and MSQ type questions. For instance while adding any type of question Description is filled and then Adding is cancelled, now add any type of new question Description is retained. Is this a required feature or this shall also be fixed?