damithc / testrepo3

0 stars 0 forks source link

Allow MCQ to have an "other" field where users can specify their own answer #222

Open damithc opened 10 years ago

damithc commented 10 years ago

From arnold.k...@gmail.com on January 03, 2014 21:33:03

The groundwork (storage etc) is actually already in the code, but need to provide for it in the UI and pass it in to the back-end properly.

Original issue: http://code.google.com/p/teammatespes/issues/detail?id=1423

damithc commented 10 years ago

From thyage...@gmail.com on March 20, 2014 20:12:54

Let me take a shot at this one :)

damithc commented 10 years ago

From dam...@gmail.com on March 20, 2014 20:16:58

It may be a bit more complicated than it appears at first. Still, I'd like to see what you come up with :-)

damithc commented 10 years ago

From thyage...@gmail.com on March 20, 2014 20:18:15

Just to check, rough outline of changes:

  1. Edit the front end so that "adding" an mcq also adds the other field (with a text box)
  2. Confirm that removing an mcq works properly with this new DOM element inserted
  3. Change InstructorFeedbackEditSave to call appropriate internal functions (for adding, editing and removing mcqs)
  4. Edit the htmls that may be affected by this front-end change
  5. Run tests
  6. Debug and and run tests till all pass
damithc commented 10 years ago

From thyage...@gmail.com on March 20, 2014 20:21:38

ok sir, will do my best ;)

damithc commented 10 years ago

From arnold.k...@gmail.com on March 20, 2014 20:26:23

  1. Edit the front end so that "adding" an mcq also adds the other field (with a text box) The other field should be optional (" add other") and the textbox will only be shown if the user wants an other field
  2. Confirm that removing an mcq works properly with this new DOM element inserted I assume you mean the options? Make sure adding/removing options arbitrarily works even with the other field
  3. Change InstructorFeedbackEditSave to call appropriate internal functions (for adding, editing and removing mcqs) Yes, some placeholders are already present :)

4,5,6 Yes, test everything

You forgot:

Good luck :)

damithc commented 10 years ago

From dam...@gmail.com on March 20, 2014 20:36:27

Don't forget the mashup page. Ensure the new UI change is visible in the mashup page too. :-)

damithc commented 10 years ago

From thyage...@gmail.com on March 20, 2014 21:01:27

Ok, wow. already on it

damithc commented 10 years ago

From arnold.k...@gmail.com on March 20, 2014 21:05:35

Anyway, when I did the UI for creating MCQ I had Google Form's creation UI as my sample so you can take a look at that too :P

damithc commented 10 years ago

From thyage...@gmail.com on March 20, 2014 21:55:13

can also add this "other" box for msqs?

damithc commented 10 years ago

From dam...@gmail.com on March 20, 2014 22:37:53

Let's do MCQ one first.

damithc commented 10 years ago

From arnold.k...@gmail.com on March 20, 2014 22:48:18

opened a new issue for MSQ ( issue 1743 )

damithc commented 10 years ago

From thyage...@gmail.com on March 20, 2014 22:59:55

ok

damithc commented 10 years ago

From dam...@gmail.com on March 26, 2014 05:59:45

Rephrase like this? Add 'Other' option (Allows respondents to type in their own answer)

damithc commented 10 years ago

From thyage...@gmail.com on March 26, 2014 06:11:22

Hi!

Here a few shots of the "other option" in action. Please comment on them and especially for the results pages as I am not sure if the current method I am using is alright :)

Thanks! Thyagesh

Attachment: EditFeedback.jpg FeedbackSubmission.jpg FeedbackSubmission1.jpg FeedbackSubmission_QuestionWithoutOtherOption.jpg FeedbackResults.jpg FeedbackResultsInCsv.jpg

damithc commented 10 years ago

From thyage...@gmail.com on March 26, 2014 06:12:09

Ok! sure sir :)

damithc commented 10 years ago

From arnold.k...@gmail.com on March 26, 2014 06:23:58

Owner: thyage...@gmail.com

damithc commented 10 years ago

From thyage...@gmail.com on March 26, 2014 06:29:51

Is this ok sir?

Status: Started

Attachment: EditedEditPage.jpg

damithc commented 10 years ago

From dam...@gmail.com on March 26, 2014 07:27:07

Arnold, see if you can do a quick review of this before you leave.

Cc: arnold.k...@gmail.com
Labels: Reviewer-Arnold

damithc commented 10 years ago

From dam...@gmail.com on March 26, 2014 07:27:51

Yes the message is ok. Need to submit quickly while Arnold is still around as he is the most suitable person to review this.

damithc commented 10 years ago

From thyage...@gmail.com on March 26, 2014 08:03:47

Sorry sir, I still have a little more to do before I can submit. It should be in tomorrow.

damithc commented 10 years ago

From arnold.k...@gmail.com on March 26, 2014 09:01:58

Hmm, for the question creation form maybe puting the checkbox below the options instead of on the right is more intuitive?

For the submission form, how about putting a disabled textbox beside "other" when it's not selected? That'll make it clearer to students that he can type in his own answer (so disabld by default, enable when other is chosen, disale again if student changed their mind)

damithc commented 10 years ago

From thyage...@gmail.com on March 26, 2014 22:45:51

ok! making necessary changes now

damithc commented 10 years ago

From thyage...@gmail.com on March 27, 2014 06:10:06

hi, I have one last question, how and where should I sanitize the value given by the students??

damithc commented 10 years ago

From thyage...@gmail.com on March 27, 2014 06:45:20

Should I do it in FeedbackResponsesDb.java while saving or in Results and Submission page java files while trying to display them on the webpage?

Thanks!

damithc commented 10 years ago

From arnold.k...@gmail.com on March 28, 2014 01:00:45

Should do both :P

damithc commented 10 years ago

From thyage...@gmail.com on April 03, 2014 10:47:04

Hi

The link (finally)to the patch: https://codereview.appspot.com/84140043/

Status: ReadyForReview

damithc commented 10 years ago

From arnold.k...@gmail.com on April 07, 2014 06:00:10

Sorry for the long wait, I just moved overseas and has been quite busy.

I haven't actually tried the UI but I think the code mostly looks good. Good job :)

There are several things that can be cleaned up though. Do look at the comments at the review site.

Also, you'll need to add tests for the things added. For UI test see if you can simulate clicking the enable other and if it saves properly. Also, make sure users can submit/edit properly (both students and instructors)For Action test make sure the Action can accept the parameters you added. Test the CSV generation too.

Status: ChangesRequested

damithc commented 10 years ago

From thyage...@gmail.com on April 15, 2014 08:14:22

Hi Arnold, sorry was a little busy with my projects.

I have made the changes you had suggested in the code review system. Regarding the point about the requirement for an 'otherFieldContent' attribute in the FeedbackMcqResponseDetails class, I think it might be of use in the future when we want to show stats about how many students gave an "other" answer. As of now it makes no difference but it might come in handy later.

I have started on the test cases.

damithc commented 10 years ago

From thyage...@gmail.com on April 17, 2014 06:10:29

Hi!

I just have a small clarification to make, will the instructor have the ability to add an 'other' option when they 'generate' the options from a list, say students?

damithc commented 10 years ago

From dam...@gmail.com on April 17, 2014 06:14:43

My feeling is, they should not. Which is easier to do? Not allowing it or allowing it?

damithc commented 10 years ago

From thyage...@gmail.com on April 17, 2014 06:51:56

internally it does not matter. But right now in the UI it does not allow.

damithc commented 10 years ago

From dam...@gmail.com on April 17, 2014 07:28:23

Let's keep it that way.

damithc commented 10 years ago

From thyage...@gmail.com on April 17, 2014 07:29:48

ok :)