Best practice forum (Archived)

Course Completion Status Block issue

 
Daniel Bond
Course Completion Status Block issue
von Daniel Bond – Thursday, 13 December 2012, 9:11 AM
Gruppe Most helpful contributor 2023

Hi,

I've got a course which is set up to enable someone with the "trainer" role to mark learners as complete. I originally enrolled a member of staff as a "learner", but now want them to be a "trainer", so gave them the "trainer" role and remove the "learner" role. Unfortunately, when I log in as them, the Course Completion Status block displays the normal user view which is how much of the course they have completed.

So I removed the user entirely, and re-enrolled them, as a trainer from the start this time. Still no luck, still seems to think they are a learner not a trainer. So I reset the course date (since it's still in testing, this isn't too much of an issue). Still doesn't work. I remove the staff member and try resetting again, still nothing. I back up the course (minus any user date) and restore it, and still no joy. From the look of the Moodle forums, on 2.2 completion date hangs around in the database even when a course disappears, so what I'm wondering is what I have to do to convince the system that the staff member should be presented with the View course report link rather than their personal completion status.

Just for reference, I set another staff member up as "trainer" who had never been enrolled on the course, and it worked just fine. When logged in as the original staff member, I can go to the course completion status page by putting in the URL to it directly, but for the life of me I can't seem to get the right contents of the Course Completion Status block to appear.

Any suggestions (other than deleting the user and recreating them, although I might be persuaded if I can't resolve this soon, but that seems to me a very extreme approach)?

? ?
Re: Course Completion Status Block issue
von ? ? – Thursday, 13 December 2012, 2:22 PM
 

Hi Dan,

I'm not sure what you mean here, what are you expecting to appear in the block when logged in as the trainer? The only difference should be the "View course report" link to the Course Completion Report. And that should appear to anyone who has the report/completion:view capability in the course context.

Are you assigning this user to the trainer role at the course level or the site level?  As Admin, go to the course and view Settings -> Course administration -> Users -> Enrolled Users to see what roles this user actually has in the course context, make sure the Trainer role is set here for the user, and the link in the Course Completion Status block should appear.

Hope this helps

Daniel Bond
Re: Course Completion Status Block issue
von Daniel Bond – Thursday, 13 December 2012, 11:32 PM
Gruppe Most helpful contributor 2023

What I'm expecting to appear is the "View course report" link, what I'm actually getting is:

Status: Not yet started
Any criteria below are required:
Required criteria Status
Course grade No grade (100% required)
Trainer No

When I'm logged in as an administrator, I get the "View course report" link, and if I enrol someone else as a trainer who has never been enrolled as a learner on the course, they also get the "View course report" link.

I am assigning this user to the trainer role at the course level, using the method you suggested (Settings -> Course administration -> Users -> Enrolled Users), as far as I can see I've not done anything odd which makes it all the more frustrating that it won't work as expected. Just for reference, the "trainer" role does have the report/completion:view capability.

Thanks for your help.

Craig Eves
Re: Course Completion Status Block issue
von Craig Eves (Totara Support) – Sunday, 16 December 2012, 5:30 PM
Gruppe Totara

Hi Dan

I checked on v2.2 by going through the Users > Enrolled users and clicking on + to add Trainer role and X to delete Learner role for a user and the completion report shows as expected.

Can you check that the user doesn't have any other roles by going into Users > Permissions > Check permissions - they should only have the trainer role for the course or course activity level.

Craig

me
Re: Course Completion Status Block issue
von George Angus – Sunday, 16 December 2012, 7:52 PM
Gruppe Totara
I couldnt replicate this either, it must come down to a conflict of permissions.
Daniel Bond
Re: Course Completion Status Block issue
von Daniel Bond – Monday, 17 December 2012, 1:38 AM
Gruppe Most helpful contributor 2023

Users > Permissions > Check permissions in the course shows the range of permissions the user has, not the role, but I can confirm that they have the moodle/course:markcomplete permission, and in "This user's role assignments" they have only the Trainer role for the course.

Thanks for your help, starting to contemplate nuking the course entirely and starting again, but obviously that doesn't solve the larger issue of why this would happen or how to deal with it for a course that students have already started to complete.

Daniel Bond
Re: Course Completion Status Block issue
von Daniel Bond – Monday, 17 December 2012, 1:59 AM
Gruppe Most helpful contributor 2023

After a little more testing, I've created a new course, added a few different users as trainers, and immediately after adding them if I log in as them I get the appropriate link.

What's strange is that, once the cron has run, some of the users cease having the link and are then presented with their completion status. It's the same result whether I use the "Log in as" functionality or actually properly log in. The difference, as far as I can see, is that the users who have never been assigned as anything other than Trainer elsewhere in the system don't ever lose the link, but users who have been assigned as a learner elsewhere do. I have confirmed this by adding a user with no Learner assignments elsewhere in the system, and repeated running of the cron and revisting the course did not cause the link to disappear. I then added them as a Learner in another course, link remained, and then after the cron had run the link changed to status information. Removing them as a Learner from the other course does not reverse this.

Craig Eves
Re: Course Completion Status Block issue
von Craig Eves (Totara Support) – Monday, 17 December 2012, 1:16 PM
Gruppe Totara

Hi Dan

Thanks for all the testing.

I tried adding the users as a trainer and then as a  learner in another course.  I ran the cron and the view course report link didn't disappear from the completion block in the courses the user was a trainer in. I was using the sandpit.totaralms.com which is Totara v2.2.10

There is a reported bug for v2.3 and http://tracker.moodle.org/browse/MDL-34476 and has been resolved on 28 Sep 12- This has probably been included in the latest Totara. There is a workaround suggested in the bug report if it hasn't made it into Totara.
Simon Coggins
Re: Course Completion Status Block issue
von Simon Coggins – Monday, 17 December 2012, 1:39 PM
Gruppe Totara

Hi Dan,

I can explain what's going on here.

Firstly, the purpose of the course completion status block is to display the completion status for the current user in that course. It's generally not designed to be used to access the completion report for the course.

However, for whatever reason, if a user has no completion data associated with the course then the block will display "You are not enrolled" and include a link to the course report. As soon as there is a course completion record for a user though, it goes away and instead displays data based on their completion record.

That explains the behaviour you are seeing - the first time the cron runs after a user is enrolled a course completion record is created, and completion records are never deleted (unless you unlock the completion criteria but then they are regenerated on the next cron run).

The solution is for the trainer to access the course completion report via the course navigation menu, under Course > Course Name > Reports > Course Completion which takes you to the same place as the link in the status block.

Hope that makes sense.

Simon

PS. Regarding Craig's comment, the patch that fixes the moodle bug he mentions was merged into Totara in release 2.2.10, so is available in the latest release should you need it.

Daniel Bond
Re: Course Completion Status Block issue
von Daniel Bond – Tuesday, 18 December 2012, 1:28 AM
Gruppe Most helpful contributor 2023

Wow, that's brilliant, thanks so much for all of your hard work on this. I will make sure that we're on the latest version which hopefully will resolve the issue.

Regards

Dan