Moodle
  1. Moodle
  2. MDL-6119

Choice lets you reselect current choice, then tells you it's full

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: Choice
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_17_STABLE
    • Rank:
      11614

      Description

      When you limit the number of respondants able to select a choice option it creates a minor UI issue.

      If you are currently 'voting' for a choice that is at its limit (and you are allowed to change your selection) then you can submit the form with the current choice still selected.

      This should just say something like you have selected your current choice therefore no changes have been made. But currently it warns you that the selection is full, which is technically true, but might momentarily worry students that think they've been kicked out of their chosen option.

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Dan Marsden (dan at digitalclay.co.nz) Monday, 17 July 2006, 02:45 AM:

        why would a teacher set a limit that is lower than what has already been selected? - shouldn't we just display an error to the teacher (and possibly automatically update the limit to the number of responoses for that choice?)

        Note the Choice now allows a teacher to delete individual responses, so they could potentially dump selected users from the list.....

        From David Scotson (d.scotson at admin.gla.ac.uk) Tuesday, 18 July 2006, 05:29 PM:

        Sorry, I wasn't clear:

        Imagine that a choice where one of the options is limited to 3 people, and two have already selected it.

        Logging in as a student you select the same option and hit submit. This works as you would expect and the option is now marked as full for any other students making a choice.

        Assuming that the Choice has also been set up so that you are allowed to change your options then the students in the limited group will still be presented with the option to select an option and re-submit the form.

        You could simply choose a different option, which would succeed as expected and free up your place on the one limited to 3.

        On the other hand, you could simply leave your selection in it's current choice, which is full including you. When you submit (which I admit is pointless) it tells you it is full which is technically true, but usually that message indicates that you have tried to join a group that is already full e.g. if someone submitted their choice just before you did.

        You can't choose any of the other full groups because they are disabled. It would be possible to disable the current choice as well, but that might panic people who choose another option and then find they can't reselect the one that they want. Obviously as a web app nothing will happen unless they hit submit, but not everyone is comfortable with that style of interaction.

        I think a specific message for this corner case would be the best solution.

        From Dan Marsden (dan at digitalclay.co.nz) Friday, 21 July 2006, 04:03 AM:

        ahh - I see what you mean now! - that's a bug, I'm pretty busy this week and next, but I might be able to squeeze a fix in!

        thanks!

        Dan

        From Dan Marsden (dan at digitalclay.co.nz) Friday, 21 July 2006, 12:54 PM:

        here's a fix - if it works, I'll commit to cvs next week!

        in modchoicelib.php

        find this:

        } else

        { error(this choice is full!); }

        replace it with this:

        } else {

        if (!($current->optionid==$formanswer))

        { error(this choice is full!); }

        }

        From Dan Marsden (dan at digitalclay.co.nz) Monday, 24 July 2006, 06:16 AM:

        fix now in head and 16_stable

        Show
        Martin Dougiamas added a comment - From Dan Marsden (dan at digitalclay.co.nz) Monday, 17 July 2006, 02:45 AM: why would a teacher set a limit that is lower than what has already been selected? - shouldn't we just display an error to the teacher (and possibly automatically update the limit to the number of responoses for that choice?) Note the Choice now allows a teacher to delete individual responses, so they could potentially dump selected users from the list..... From David Scotson (d.scotson at admin.gla.ac.uk) Tuesday, 18 July 2006, 05:29 PM: Sorry, I wasn't clear: Imagine that a choice where one of the options is limited to 3 people, and two have already selected it. Logging in as a student you select the same option and hit submit. This works as you would expect and the option is now marked as full for any other students making a choice. Assuming that the Choice has also been set up so that you are allowed to change your options then the students in the limited group will still be presented with the option to select an option and re-submit the form. You could simply choose a different option, which would succeed as expected and free up your place on the one limited to 3. On the other hand, you could simply leave your selection in it's current choice, which is full including you . When you submit (which I admit is pointless) it tells you it is full which is technically true, but usually that message indicates that you have tried to join a group that is already full e.g. if someone submitted their choice just before you did. You can't choose any of the other full groups because they are disabled. It would be possible to disable the current choice as well, but that might panic people who choose another option and then find they can't reselect the one that they want. Obviously as a web app nothing will happen unless they hit submit, but not everyone is comfortable with that style of interaction. I think a specific message for this corner case would be the best solution. From Dan Marsden (dan at digitalclay.co.nz) Friday, 21 July 2006, 04:03 AM: ahh - I see what you mean now! - that's a bug, I'm pretty busy this week and next, but I might be able to squeeze a fix in! thanks! Dan From Dan Marsden (dan at digitalclay.co.nz) Friday, 21 July 2006, 12:54 PM: here's a fix - if it works, I'll commit to cvs next week! in modchoicelib.php find this: } else { error(this choice is full!); } replace it with this: } else { if (!($current->optionid==$formanswer)) { error(this choice is full!); } } From Dan Marsden (dan at digitalclay.co.nz) Monday, 24 July 2006, 06:16 AM: fix now in head and 16_stable

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: