Moodle
  1. Moodle
  2. MDL-8556

Give more flexibility when editing repeat elements in a form

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.8
    • Fix Version/s: None
    • Component/s: Forms Library
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Rank:
      3494

      Description

      To implement the original request (below), the best solution would be to make the forms library repeat elements code more flexible, so that (if the form definition requested it) the user could do any or all of:

      • Re-order the repeated things
      • Add new blank elements anywhere in sequence, not just at the end.
      • Delete one of the repeated elements from the middle

      Original request:

      The questions editing window for a new question always presents 10 empty answers. This is usually much more than needed. However, when more than 10 anwers are needed, the only way to get an eleventh empty field is to save the first 10 answers and re-edit the question, etc. This is not user-friendly.
      For most question types the ORDER of the answers is not important. However, for some, especially the SHORTANSWER and above all the REGEXP question types, the ORDER is of paramount importance. Moreover, it is often necessary, when modifying questions of the latter type, to insert a new "answer" (i.e. a regular expression) between two existing "answers". This is not possible, and can only be achieved through tedious copying and pasting of answer & feedback text from one field to another.
      I am suggesting the implementation of a tool - similar up to a point to the questions re-ordering tool in the questions bank, which would do the following.
      1- When a new question is created, it is created with 3 empty fields only (this is enough for most question types).
      2- At any time when creating or modifying a question, it is possible to move each answer (and attached feedback text and attached grade) up or down.
      3- It is possible to insert an empty answer field (& attached feedback & grade fields, of course) anywhere between 2 existing answer fields or before the first or after the last existing answer fields.
      I do not have the necessary programing skills to embark upon this improvement, but I offer to collaborate to any endeavour towards it and provide extensive and reliable testing.
      Joseph Rézeau

        Activity

        Joseph Rézeau created issue -
        Hide
        Joseph Rézeau added a comment -

        Screen shot showing what the re-ordering and insert buttons might look like.

        Show
        Joseph Rézeau added a comment - Screen shot showing what the re-ordering and insert buttons might look like.
        Joseph Rézeau made changes -
        Field Original Value New Value
        Attachment screenshot-1.jpg [ 10792 ]
        Hide
        Jeff Forssell added a comment -

        I'm assuming that the -> arrow means "insert another answer" But it would need either another placement or a tooltip saying "Inserts a new answer field set ABOVE this one" for one to know WHERE it would wind up (hardly between answer 1 and its feedback).

        Hopefully some kind of AJAX thing which wouldn't need a new page load for each change. (Any way to avoid the risk of losing a lot of work if something "freaks out" before submitting?)

        Show
        Jeff Forssell added a comment - I'm assuming that the -> arrow means "insert another answer" But it would need either another placement or a tooltip saying "Inserts a new answer field set ABOVE this one" for one to know WHERE it would wind up (hardly between answer 1 and its feedback). Hopefully some kind of AJAX thing which wouldn't need a new page load for each change. (Any way to avoid the risk of losing a lot of work if something "freaks out" before submitting?)
        Tim Hunt made changes -
        Summary Re-ordering and insert Answers tool needed for Questions editing Give more flexibility when editing repeat elements in a form
        Component/s Forms Library [ 10091 ]
        Component/s Questions [ 10087 ]
        Affects Version/s 1.8 [ 10130 ]
        Affects Version/s 1.7.1 [ 10151 ]
        Affects Version/s 1.7 [ 10120 ]
        Description The questions editing window for a new question always presents 10 empty answers. This is usually much more than needed. However, when more than 10 anwers are needed, the only way to get an eleventh empty field is to save the first 10 answers and re-edit the question, etc. This is not user-friendly.
        For most question types the ORDER of the answers is not important. However, for some, especially the SHORTANSWER and above all the REGEXP question types, the ORDER is of paramount importance. Moreover, it is often necessary, when modifying questions of the latter type, to insert a new "answer" (i.e. a regular expression) between two existing "answers". This is not possible, and can only be achieved through tedious copying and pasting of answer & feedback text from one field to another.
        I am suggesting the implementation of a tool - similar up to a point to the questions re-ordering tool in the questions bank, which would do the following.
        1- When a new question is created, it is created with 3 empty fields only (this is enough for most question types).
        2- At any time when creating or modifying a question, it is possible to move each answer (and attached feedback text and attached grade) up or down.
        3- It is possible to insert an empty answer field (& attached feedback & grade fields, of course) anywhere between 2 existing answer fields or before the first or after the last existing answer fields.
        I do not have the necessary programing skills to embark upon this improvement, but I offer to collaborate to any endeavour towards it and provide extensive and reliable testing.
        Joseph Rézeau
        To implement the original request (below), the best solution would be to make the forms library repeat elements code more flexible, so that (if the form definition requested it) the user could do any or all of:

        * Re-order the repeated things
        * Add new blank elements anywhere in sequence, not just at the end.
        * Delete one of the repeated elements from the middle


        Original request:

        The questions editing window for a new question always presents 10 empty answers. This is usually much more than needed. However, when more than 10 anwers are needed, the only way to get an eleventh empty field is to save the first 10 answers and re-edit the question, etc. This is not user-friendly.
        For most question types the ORDER of the answers is not important. However, for some, especially the SHORTANSWER and above all the REGEXP question types, the ORDER is of paramount importance. Moreover, it is often necessary, when modifying questions of the latter type, to insert a new "answer" (i.e. a regular expression) between two existing "answers". This is not possible, and can only be achieved through tedious copying and pasting of answer & feedback text from one field to another.
        I am suggesting the implementation of a tool - similar up to a point to the questions re-ordering tool in the questions bank, which would do the following.
        1- When a new question is created, it is created with 3 empty fields only (this is enough for most question types).
        2- At any time when creating or modifying a question, it is possible to move each answer (and attached feedback text and attached grade) up or down.
        3- It is possible to insert an empty answer field (& attached feedback & grade fields, of course) anywhere between 2 existing answer fields or before the first or after the last existing answer fields.
        I do not have the necessary programing skills to embark upon this improvement, but I offer to collaborate to any endeavour towards it and provide extensive and reliable testing.
        Joseph Rézeau
        Assignee Tim Hunt [ timhunt ] Jamie Pratt [ jamiesensei ]
        Priority Major [ 3 ] Minor [ 4 ]
        Hide
        Joseph Rézeau added a comment -

        Jeff > I'm assuming that the -> arrow means "insert another answer" But it would need either another placement or a tooltip saying "Inserts a new answer field set ABOVE this one" for one to know WHERE it would wind up (hardly between answer 1 and its feedback).

        Your assumptions are quite correct. Tooltip needed, and maybe more explicit arrows. Anyway, I still very much need a re-ordering plus insert tool in Answers editing...

        Joseph

        Show
        Joseph Rézeau added a comment - Jeff > I'm assuming that the -> arrow means "insert another answer" But it would need either another placement or a tooltip saying "Inserts a new answer field set ABOVE this one" for one to know WHERE it would wind up (hardly between answer 1 and its feedback). Your assumptions are quite correct. Tooltip needed, and maybe more explicit arrows. Anyway, I still very much need a re-ordering plus insert tool in Answers editing... Joseph
        Hide
        Jamie Pratt added a comment -

        I'm not going to get a chance to work on this soon. Anybody else want to take this on?

        Show
        Jamie Pratt added a comment - I'm not going to get a chance to work on this soon. Anybody else want to take this on?
        Hide
        Jeff Forssell added a comment -

        I just want to point out that even in the numerical questions the re-ordering need can be experienced.

        It doesn't have to be a AJAX drag and drop thing. Though that would be more intuitive for people not accustomed to programming line renumbering.

        To have a re-ordering tool like in the quiz question UI would be great. Alternatives numbered 10 20 30 40 etc. If I change 40 to 21 and press a reorder button (or just Save?) that alternative would move to between 20 and 30.

        Show
        Jeff Forssell added a comment - I just want to point out that even in the numerical questions the re-ordering need can be experienced. It doesn't have to be a AJAX drag and drop thing. Though that would be more intuitive for people not accustomed to programming line renumbering. To have a re-ordering tool like in the quiz question UI would be great. Alternatives numbered 10 20 30 40 etc. If I change 40 to 21 and press a reorder button (or just Save?) that alternative would move to between 20 and 30.
        Martin Dougiamas made changes -
        Workflow jira [ 19505 ] MDL Workflow [ 42000 ]
        Martin Dougiamas made changes -
        Workflow MDL Workflow [ 42000 ] MDL Full Workflow [ 70427 ]

          People

          • Votes:
            7 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: