Details
-
Bug
-
Resolution: Fixed
-
Minor
-
3.7
-
MOODLE_37_STABLE
-
MOODLE_36_STABLE, MOODLE_37_STABLE
-
Hide
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.
ShowPrerequisites: 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.
Description
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
Attachments
Issue Links
- Discovered while testing
-
MDLSITE-5730 Upgrade moodle.org to 3.7
-
- Closed
-
- has a non-specific relationship to
-
MDL-54962 Apparently no text string assigned to ##approvalstatus## tag
-
- Closed
-