-
Functional Test
-
Moodle 2.5
-
None
Note: This test requires Badges and Activity completion to have been enabled in Site administration>Settings>Advanced features. It also requires an empty course with a teacher, a student and Activity completion enabled in the course settings. the completion status block must be added to the course.
1. As a teacher, create a URL resource and a page resource. Set both to be marked as complete once viewed.
2. Visit Settings>Course administration>Completion tracking and set course completion to be achieved by "All" of both the URL and page in the Activities completed section.
3. Visit Settings>Course administration>Badges>Add a new badge and add a new badge.
4. From the Criteria tab, choose "course completion" in the dropdown.
5. Log in as a student and access the URL.
6. Go to My profile>My badges and verify you do NOT have the badge.
7. Click on the page resource.
8. Verify from the completion status block that you have completed the course. Run cron from the browser (....admin/cron.php if needed)
9. Go to My profile>My badges and verify you now see the badge.
10. Log in as a teacher and visit Settings>Course administration>Badges>Manage badges and verify that in the criteria it shows the student has been awarded the badge.