Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40871

Allow for bulk deletion of entries in the database module.

    Details

    • Testing Instructions:
      Hide
      1. Create a database activity.
      2. Add some fields.
      3. Save the templates.
      4. Add some entries.
      5. On the list view Check some boxes next to the entries.
      6. Test the "select all" and "deselect all" buttons to make sure that they work as expected.
      7. At the bottom of the list should be a button saying "Delete checked"
      8. After clicking the "delete checked" button you should be taken to a confirmation page.
      9. Click cancel and make sure that you are taken back to the list view.
      10. Try again but this time confirm the delete and ensure that the entry has been deleted.
      11. Log in as a student and view the list view page. Make sure that as a student that there are no check boxes or buttons to delete the entries.
      Show
      Create a database activity. Add some fields. Save the templates. Add some entries. On the list view Check some boxes next to the entries. Test the "select all" and "deselect all" buttons to make sure that they work as expected. At the bottom of the list should be a button saying "Delete checked" After clicking the "delete checked" button you should be taken to a confirmation page. Click cancel and make sure that you are taken back to the list view. Try again but this time confirm the delete and ensure that the entry has been deleted. Log in as a student and view the list view page. Make sure that as a student that there are no check boxes or buttons to delete the entries.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-40871-master

      Description

      I'm not sure how useful this would be for teachers, but when loading in dummy data manually or via csv, I find deleting each entry time consuming.
      I'd like to be able to check the entries and then delete all of them at once.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            andyjdavis Andrew Davis added a comment -

            Pretty sure this should be a get_string() call and not a literal string.

            echo html_writer::empty_tag('input', array('class' => 'form-submit', 'type' => 'submit', 'value' => 'Delete checked'));

            "select all", "deselect all", "Delete checked". Is the phrase "selected" or "checked"?

            You have funny components in your git commit messages. data_mod and mod_data.

            Otherwise, you are go for integration.

            Show
            andyjdavis Andrew Davis added a comment - Pretty sure this should be a get_string() call and not a literal string. echo html_writer::empty_tag('input', array('class' => 'form-submit', 'type' => 'submit', 'value' => 'Delete checked')); "select all", "deselect all", "Delete checked". Is the phrase "selected" or "checked"? You have funny components in your git commit messages. data_mod and mod_data. Otherwise, you are go for integration.
            Hide
            abgreeve Adrian Greeve added a comment -

            Thanks Andrew for the review.

            I've added the get_string to use "deleteselected" which will display "Delete selected" This will keep all the buttons using the same language.

            I also made an update to replacing the add_to_log calls in mod/data to check for the new function and log call that I added.

            Sending to integration.

            Show
            abgreeve Adrian Greeve added a comment - Thanks Andrew for the review. I've added the get_string to use "deleteselected" which will display "Delete selected" This will keep all the buttons using the same language. I also made an update to replacing the add_to_log calls in mod/data to check for the new function and log call that I added. Sending to integration.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Adrian this has been integrated now.

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Adrian this has been integrated now.
            Hide
            rwijaya Rossiani Wijaya added a comment -

            This is working as expected.

            Tested for master only.

            Test passed.

            Show
            rwijaya Rossiani Wijaya added a comment - This is working as expected. Tested for master only. Test passed.
            Hide
            poltawski Dan Poltawski added a comment -

            Cảm ơn!

            Your changes have now been merged upstream in git and will be available on the Moodle download sites shortly!

            Một hai ba, yo

            Show
            poltawski Dan Poltawski added a comment - Cảm ơn! Your changes have now been merged upstream in git and will be available on the Moodle download sites shortly! Một hai ba, yo
            Hide
            marycooch Mary Cooch added a comment -

            Just for the record, added a QA test here MDLQA-6668 (2.6) and to the master copy also MDLQA-6669. Also for the record it seemed that when I tried on a pre-made database activity on the QA site, no checkboxes appeared (but the select all/delete all buttons did) However, when I created a new database, they did appear.

            Show
            marycooch Mary Cooch added a comment - Just for the record, added a QA test here MDLQA-6668 (2.6) and to the master copy also MDLQA-6669 . Also for the record it seemed that when I tried on a pre-made database activity on the QA site, no checkboxes appeared (but the select all/delete all buttons did) However, when I created a new database, they did appear.
            Hide
            marycooch Mary Cooch added a comment -

            Removing docs_required label as this is documented in http://docs.moodle.org/26/en/Using_Database and in http://docs.moodle.org/26/en/Database_activity_FAQ

            Show
            marycooch Mary Cooch added a comment - Removing docs_required label as this is documented in http://docs.moodle.org/26/en/Using_Database and in http://docs.moodle.org/26/en/Database_activity_FAQ
            Hide
            abgreeve Adrian Greeve added a comment -

            Thanks Mary!

            You're a star

            Show
            abgreeve Adrian Greeve added a comment - Thanks Mary! You're a star

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/13