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

Tagging database entries

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Prerequisite.
      1. Log in as an admin.
      2. Visit 'Site Administration' > 'Advanced features'.
      3. Ensure 'Enable tags functionality' is enabled.
      4. Go to 'Site Administration' > 'Appearance' > 'Manage Tags'.
      5. Confirm 'Data records' is in the 'Default collection'.
      6. Create a course with two students enrolled.
      Test 1
      1. Visit a course.
      2. Create a database module.
      3. Add a text input field to the module.
      4. Save the template.
      5. Add an entry with a tag.
      6. View the entry.
      7. Click on the tag and confirm it takes you to the tag index page.
      8. Check that the database activity is listed.
      9. Confirm the links on the tag index page will take you back to the tagged entry.
      Test 2
      1. Visit a course.
      2. Create a database module.
      3. Add a text input field to the module.
      4. Save the template.
      5. Add an entry with a tag.
      6. Go to the course reset page.
      7. Check to remove all database tags.
      8. Submit the form.
      9. Confirm you get a message saying that the database tags have been removed.
      10. Go to the database entry and confirm all the tags have been deleted.
      Test 3
      1. Visit a course.
      2. Create a database module.
      3. Add a text input field to the module.
      4. Save the template.
      5. Add an entry with a tag.
      6. Go to the course reset page.
      7. Do not check anything.
      8. Submit the form.
      9. Look at the entry in the database and confirm the tag is still there.
      10. Go to the course reset page.
      11. Check to delete all entries.
      12. Confirm the 'Remove all database tags' checkbox becomes disabled.
      13. Submit the form.
      14. Confirm you get a message saying that the database entries have been removed.
      15. Click on the database and confirm all entries have been deleted.
      16. Run php admin/tool/task/cli/schedule_task.php --execute=\\core\\task
        tag_cron_task
      17. Look in your 'mdl_tag' table and confirm the tags were deleted as well.
      Test 4
      1. Visit a course.
      2. Create a database module.
      3. Add a text input field to the module.
      4. Save the template.
      5. Add an entry with a unique tag.
      6. Hide the module.
      7. Go to tag index page (currently in Boost you can't without visiting the URL (see MDL-57120)) by going to <yoursite>/tag/index.php.
      8. Confirm you can search for the tag.
      9. Confirm when clicking on the tag it shows you information.
      10. Log in as a student.
      11. Go to <yoursite>/tag/index.php.
      12. Confirm you can see the tag (not ideal - see MDL-60186).
      13. Confirm clicking on the tag reveals no information.
      Test 5
      1. Visit a course.
      2. Create a database module.
      3. Add a text input field to the module.
      4. Save the template.
      5. Add an entry with a unique tag.
      6. Log in as a user who is NOT enrolled in the course.
      7. Go to <yoursite>/tag/index.php.
      8. Confirm you can see the tag (not ideal - see MDL-60186).
      9. Confirm clicking on the tag reveals no information.
      Test 6
      1. Create a database activity with 'Approval required' set to 'Yes'.
      2. Add a text input field to the module.
      3. Save the template.
      4. Log in as a student.
      5. Add an entry with a tag.
      6. Do a search in the database module (not tag index page) and confirm you can search for it.
      7. Visit the tag index page.
      8. Confirm you can see the tag entry and can also search for it.
      9. Confirm clicking on it takes you to the database activity.
      10. Log in as the admin.
      11. Visit the database module.
      12. Confirm you can see the entry but do not approve it.
      13. Do a search in the database module (not tag index page) and confirm you can search for it.
      14. Visit the tag index page.
      15. Confirm you can see the tag entry and can also search for it.
      16. Confirm clicking on it takes you to the database activity.
      17. Log in as another student in the course.
      18. Do a search in the database module (not tag index page) and confirm you can not search for it.
      19. Go to <yoursite>/tag/index.php.
      20. Confirm you can see the tag (not ideal - see MDL-60186).
      21. Confirm clicking on the tag reveals no information.
      22. Log in as the admin and approve both entries.
      23. Log in as one of the students.
      24. Do a search in the database module (not tag index page) and confirm you can search for both tags.
      25. Visit the tag index page.
      26. Confirm you can see both tags.
      27. Confirm clicking on them shows the database module.
      Test 7
      1. Visit a course.
      2. Create a database module.
      3. Add a text input field to the module.
      4. Save the template.
      5. Add an entry with a tag.
      6. Create a backup of the database module.
      7. Restore this backup on another site also running integration master with tags enabled.
      8. Confirm the tags are present in the entry in the restored module.
      Test 8
      1. Visit a course.
      2. Create a database module.
      3. Add a text input field to the module.
      4. Save the template.
      5. Add an entry with a tag.
      6. Click on the 'Export' tab.
      7. Select to export all the items.
      8. Download the file.
      9. Go to the other site running integration master.
      10. Create a database activity.
      11. Add a field (stupid you have to do this but need to in order to get to the options menu).
      12. On the field page click on the cog in the top right and select 'Import entries'.
      13. Upload the file you downloaded.
      14. Confirm it imported.
      15. Click on 'View list' and confirm it imported correctly.
      Test 9
      1. Log in as an admin.
      2. Visit a course.
      3. Create a database module.
      4. Add a text input field to the module.
      5. Save the template.
      6. Add an entry with a tag (tag must contain more than 1 character).
      7. Click on the 'Add entry' tab again.
      8. Click on the link 'Manage standard tags'.
      9. Set the tag you just added to 'Standard'.
      10. Go back to the database module.
      11. Go to the 'Add entry' tab.
      12. Type the first character of the tag in the tag input.
      13. Confirm it gets suggested by the autocomplete input.
      Show
      Prerequisite. Log in as an admin. Visit 'Site Administration' > 'Advanced features'. Ensure 'Enable tags functionality' is enabled. Go to 'Site Administration' > 'Appearance' > 'Manage Tags'. Confirm 'Data records' is in the 'Default collection'. Create a course with two students enrolled. Test 1 Visit a course. Create a database module. Add a text input field to the module. Save the template. Add an entry with a tag. View the entry. Click on the tag and confirm it takes you to the tag index page. Check that the database activity is listed. Confirm the links on the tag index page will take you back to the tagged entry. Test 2 Visit a course. Create a database module. Add a text input field to the module. Save the template. Add an entry with a tag. Go to the course reset page. Check to remove all database tags. Submit the form. Confirm you get a message saying that the database tags have been removed. Go to the database entry and confirm all the tags have been deleted. Test 3 Visit a course. Create a database module. Add a text input field to the module. Save the template. Add an entry with a tag. Go to the course reset page. Do not check anything. Submit the form. Look at the entry in the database and confirm the tag is still there. Go to the course reset page. Check to delete all entries. Confirm the 'Remove all database tags' checkbox becomes disabled. Submit the form. Confirm you get a message saying that the database entries have been removed. Click on the database and confirm all entries have been deleted. Run php admin/tool/task/cli/schedule_task.php --execute=\\core\\task tag_cron_task Look in your 'mdl_tag' table and confirm the tags were deleted as well. Test 4 Visit a course. Create a database module. Add a text input field to the module. Save the template. Add an entry with a unique tag. Hide the module. Go to tag index page (currently in Boost you can't without visiting the URL (see MDL-57120 )) by going to <yoursite>/tag/index.php. Confirm you can search for the tag. Confirm when clicking on the tag it shows you information. Log in as a student. Go to <yoursite>/tag/index.php. Confirm you can see the tag (not ideal - see MDL-60186 ). Confirm clicking on the tag reveals no information. Test 5 Visit a course. Create a database module. Add a text input field to the module. Save the template. Add an entry with a unique tag. Log in as a user who is NOT enrolled in the course. Go to <yoursite>/tag/index.php. Confirm you can see the tag (not ideal - see MDL-60186 ). Confirm clicking on the tag reveals no information. Test 6 Create a database activity with 'Approval required' set to 'Yes'. Add a text input field to the module. Save the template. Log in as a student. Add an entry with a tag. Do a search in the database module ( not tag index page) and confirm you can search for it. Visit the tag index page. Confirm you can see the tag entry and can also search for it. Confirm clicking on it takes you to the database activity. Log in as the admin. Visit the database module. Confirm you can see the entry but do not approve it. Do a search in the database module ( not tag index page) and confirm you can search for it. Visit the tag index page. Confirm you can see the tag entry and can also search for it. Confirm clicking on it takes you to the database activity. Log in as another student in the course. Do a search in the database module ( not tag index page) and confirm you can not search for it. Go to <yoursite>/tag/index.php. Confirm you can see the tag (not ideal - see MDL-60186 ). Confirm clicking on the tag reveals no information. Log in as the admin and approve both entries. Log in as one of the students. Do a search in the database module ( not tag index page) and confirm you can search for both tags. Visit the tag index page. Confirm you can see both tags. Confirm clicking on them shows the database module. Test 7 Visit a course. Create a database module. Add a text input field to the module. Save the template. Add an entry with a tag. Create a backup of the database module. Restore this backup on another site also running integration master with tags enabled. Confirm the tags are present in the entry in the restored module. Test 8 Visit a course. Create a database module. Add a text input field to the module. Save the template. Add an entry with a tag. Click on the 'Export' tab. Select to export all the items. Download the file. Go to the other site running integration master. Create a database activity. Add a field (stupid you have to do this but need to in order to get to the options menu). On the field page click on the cog in the top right and select 'Import entries'. Upload the file you downloaded. Confirm it imported. Click on 'View list' and confirm it imported correctly. Test 9 Log in as an admin. Visit a course. Create a database module. Add a text input field to the module. Save the template. Add an entry with a tag (tag must contain more than 1 character). Click on the 'Add entry' tab again. Click on the link 'Manage standard tags'. Set the tag you just added to 'Standard'. Go back to the database module. Go to the 'Add entry' tab. Type the first character of the tag in the tag input. Confirm it gets suggested by the autocomplete input.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57455_master

      Description

      Currently unable to tag database entries

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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