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

mod_data does not highlight unapproved entries.

XMLWordPrintable

    • MOODLE_37_STABLE
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • Hide

      Prerequisites:

      1. 1 course
      2. 2 users enrolled into the course(Admin as Teacher, student as Student)
      3. A database activity within the course with 'Approval required' setting set to true

      Testing instructions:

      Upgrade
      1. Checkout an older version of Moodle (3.5 would be a nice choice: "git checkout v3.5.0")
      2. Do a fresh install of this site.
      3. Login as an admin
      4. Go to the course
      5. Go to the database activity
      6. Go to the 'Fields' tab
      7. Select 'text area' in the 'Create a new field' drop down
      8. Set the field name to 'test'
      9. Press the 'Add' button
      10. Navigate to the 'Templates' tab
      11. On the "List template" tab, add "##approvalstatus##" after "##delcheck##" in the "Repeated entry" text editor.
      12. Save the template.
      13. Click on the "Single template" tab and add "##approvalstatus##" anywhere in the "Single template" editor
      14. Save the template.
      15. On a separate browser instance (e.g. incognito mode), log in as a student
      16. Navigate to the database activity
      17. Select 'Add entry'
      18. in the 'test' text area enter 'some content'
      19. Press 'Save and view'
      20. You'll see that the newly entered entry does not have a pink background
      21. You should also see "Entry is not approved yet" for the entry in both List and Single views.
      22. Checkout the branch you're testing (e.g. for master, "git checkout master". For 37, "git checkout MOODLE_37_STABLE", etc.)
      23. Back on the admin's browser, upgrade the instance.
      24. Confirm that the upgrade completes successfully.
      25. Back on the student's browser, refresh the view page.
      26. Confirm that your unapproved entry now has a pink background in both List and Single views.
      27. Confirm that the approval status of your entry still shows as "Entry is not approved yet." in both List and Single views.
      28. On the admin's browser, navigate to the Database module
      29. Confirm the student's unapproved entry has a pink background in both List and Single views.
      30. Confirm that the approval status of the student's entry still shows as "Entry is not approved yet." in both List and Single views.
      31. Approve the entry via the thumbs up icon in the entry
      32. Confirm the entry no longer has a pink background in both List and Single views.
      33. Confirm that the approval status of the student's entry now shows as "Approved" in both List and Single views.
      34. On the student's browser, refresh the page with the entry.
      35. Confirm the entry no longer has a pink background in both List and Single views.
      36. Confirm that the approval status of your entry now shows as "Approved" in both List and Single views.
      New DB activity instances
      1. On the admin's browser, go to the course homepage and create another database activity which requires approval for the entries.
      2. Create a text field.
      3. Go to the templates tab and save the default template.
      4. Navigate to the 'Templates' tab
      5. On the "List template" tab, add "##approvalstatus##" after "##delcheck##" in the "Repeated entry" text editor.
      6. Save the template.
      7. Click on the "Single template" tab and add "##approvalstatus##" anywhere in the "Single template" editor
      8. Save the template.
      9. Back on the student's browser, navigate to the new database activity
      10. Select 'Add entry'
      11. Enter some text in the text field.
      12. Press 'Save and view'
      13. Confirm that your unapproved entry has a pink background in both List and Single views.
      14. Confirm that the approval status of your entry is shown as "Entry is not approved yet." in both List and Single views.
      15. On the admin's browser, navigate to the new database activity
      16. Confirm the student's unapproved entry has a pink background in both List and Single views.
      17. Confirm that the approval status of the student's entry still shows as "Entry is not approved yet." in both List and Single views.
      18. Approve the entry via the thumbs up icon in the entry
      19. Confirm the entry no longer has a pink background in both List and Single views.
      20. Confirm that the approval status of the student's entry now shows as "Approved" in both List and Single views.
      21. On the student's browser, refresh the page with the entry.
      22. Confirm the entry no longer has a pink background in both List and Single views.
      23. Confirm that the approval status of your entry now shows as "Approved" in both List and Single views.
      Show
      Prerequisites: 1 course 2 users enrolled into the course(Admin as Teacher, student as Student) A database activity within the course with 'Approval required' setting set to true Testing instructions: Upgrade Checkout an older version of Moodle (3.5 would be a nice choice: " git checkout v3.5.0 ") Do a fresh install of this site. Login as an admin Go to the course Go to the database activity Go to the 'Fields' tab Select 'text area' in the 'Create a new field' drop down Set the field name to 'test' Press the 'Add' button Navigate to the 'Templates' tab On the " List template " tab, add " ##approvalstatus## " after " ##delcheck## " in the " Repeated entry " text editor. Save the template. Click on the " Single template " tab and add " ##approvalstatus## " anywhere in the " Single template " editor Save the template. On a separate browser instance (e.g. incognito mode), log in as a student Navigate to the database activity Select 'Add entry' in the 'test' text area enter 'some content' Press 'Save and view' You'll see that the newly entered entry does not have a pink background You should also see " Entry is not approved yet " for the entry in both List and Single views. Checkout the branch you're testing (e.g. for master, " git checkout master ". For 37, " git checkout MOODLE_37_STABLE ", etc.) Back on the admin's browser, upgrade the instance. Confirm that the upgrade completes successfully. Back on the student's browser, refresh the view page. Confirm that your unapproved entry now has a pink background in both List and Single views. Confirm that the approval status of your entry still shows as " Entry is not approved yet. " in both List and Single views. On the admin's browser, navigate to the Database module Confirm the student's unapproved entry has a pink background in both List and Single views. Confirm that the approval status of the student's entry still shows as " Entry is not approved yet. " in both List and Single views. Approve the entry via the thumbs up icon in the entry Confirm the entry no longer has a pink background in both List and Single views. Confirm that the approval status of the student's entry now shows as " Approved " in both List and Single views. On the student's browser, refresh the page with the entry. Confirm the entry no longer has a pink background in both List and Single views. Confirm that the approval status of your entry now shows as " Approved " in both List and Single views. New DB activity instances On the admin's browser, go to the course homepage and create another database activity which requires approval for the entries. Create a text field. Go to the templates tab and save the default template. Navigate to the 'Templates' tab On the " List template " tab, add " ##approvalstatus## " after " ##delcheck## " in the " Repeated entry " text editor. Save the template. Click on the " Single template " tab and add " ##approvalstatus## " anywhere in the " Single template " editor Save the template. Back on the student's browser, navigate to the new database activity Select 'Add entry' Enter some text in the text field. Press 'Save and view' Confirm that your unapproved entry has a pink background in both List and Single views. Confirm that the approval status of your entry is shown as " Entry is not approved yet. " in both List and Single views. On the admin's browser, navigate to the new database activity Confirm the student's unapproved entry has a pink background in both List and Single views. Confirm that the approval status of the student's entry still shows as " Entry is not approved yet. " in both List and Single views. Approve the entry via the thumbs up icon in the entry Confirm the entry no longer has a pink background in both List and Single views. Confirm that the approval status of the student's entry now shows as " Approved " in both List and Single views. On the student's browser, refresh the page with the entry. Confirm the entry no longer has a pink background in both List and Single views. Confirm that the approval status of your entry now shows as " Approved " in both List and Single views.

      When testing MDLSITE-5730 I found that the database activity module should be able to highlight submitted entries that have not been approved yet.

      I believe this functionality was broken after MDL-54962 where the 'notapproved' class got changed to the lang string of 'notapproved'. This means an entry will effectively have the following classes mod-data-default-template Entry is not approved yet. This means the following style will not be called link

            mathewmay Mathew May
            mathewmay Mathew May
            Peter Dias Peter Dias
            Jun Pataleta Jun Pataleta
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 50 minutes
                1d 2h 50m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.