Re-running the activity completion script?

Re-running the activity completion script?

by Conn Warwicker -
Number of replies: 13
Picture of Core developers Picture of Plugin developers

Hi,

Students have completed activities, but the settings for activity completion were created incorrectly, so none of them have the activities as "complete" and so don't show up with completions in the Activity Completion Report.

I have fixed the settings, so any students who complete the activities in the future, will have them marked as complete, but how can I re-run the scripts to mark all the old attempts as completed?

I have tried running the scheduled tasks:

(core\task\completion_daily_task)
 (core\task\completion_regular_task)
But it's had no effect, the old attempts which now should meet the activity completion settings, are still not being marked as complete.


Thanks.

Average of ratings: -
In reply to Conn Warwicker

Re: Re-running the activity completion script?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You don't - it's re-run automatically by a Scheduled task.

Well, it is if you have Cron running properly on your site. 

In reply to Howard Miller

Re: Re-running the activity completion script?

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

Hi,

As I said, I have force-run the scheduled tasks and it had no effect.

In reply to Conn Warwicker

Re: Re-running the activity completion script?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

In which case, your completion settings are wrong or the data indicating that the old students are complete is incomplete. 

In reply to Howard Miller

Re: Re-running the activity completion script?

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

Hi,

The activity completion settings are set to:

- Student must view this activity to complete it

- Require status Passed

I have tested it by going in with a new student who hasn't attempted before, and completing the activity, getting a Passed status, and it works for them. Theirs is ticked as complete.


Old students who completed it before, and who have the Passed status, are not being updated to complete.


I'm not sure what else to try.


In reply to Conn Warwicker

Re: Re-running the activity completion script?

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers

When the course completion conditions are adjusted, student's that took the course before the conditions were adjusted will need to have any of the course activities manually selected as completed before the cron job will update the course status to complete.

Running 3.5.1.


In reply to Shirley Gregorczyk

Re: Re-running the activity completion script?

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

Hi,

This isn't for "course completion", this is just for the individual "activity completion" - the tickbox you get next to activities to indicate whether the student has completed them or not, which then shows up on the Activity Completion report inside the course.

So I think it may work differently.


In reply to Conn Warwicker

Re: Re-running the activity completion script?

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers

What is the activity type?

A url which must be viewed to be marked complete?

A Quiz with a specific grade to be marked as complete?

A Label that a student "may" select to mark as complete?


In reply to Shirley Gregorczyk

Re: Re-running the activity completion script?

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

Hi,

The activity is a SCORM.

With the settings:

- Student must view this activity to complete it

- Require status "Passed"

In reply to Conn Warwicker

Re: Re-running the activity completion script?

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers

1. What is the SCORM content's published completion conditions?

A number of slides viewed, or a grade achieved within the SCORM content?

2. The student's who attempted the course in the past may have not accomplished the content's completion condition.

Did you look at the student's attempts for the SCORM activity?

In reply to Shirley Gregorczyk

Re: Re-running the activity completion script?

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

Hi,

I've looked at the attempts and there are lots of students with attempts with the "Passed" status, which is the only requirement other than "View the activity", so I believe they should be marked as completed.




This is the activity attempt of my test student, was has been marked complete (Has the "Passed" status:





And here is one for another student, with the status "Passed", but which has not been marked as complete:




In reply to Conn Warwicker

Re: Re-running the activity completion script?

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers

Because the students completed the activity before you made the adjustments, I do not believe the CRON job will look "backwards in time"

I suspect you may have to manually update the activity status in course Reports>Activity Completions for each of the students.

I needed to do this yesterday for 200+ students - two clicks for each student - not on my list of fun things to do.


In reply to Conn Warwicker

Re: Re-running the activity completion script?

by Melanie Scott -
Picture of Particularly helpful Moodlers

The student must view bit can sometimes throw a wrench in the works--maybe it isn't remembering they viewed it and they haven't viewed it since the condition was set?  You could ask one of them to open the scorm (not redo it, just open it) and see what happens (or, login as them and open it).

Personally, I never use that requirement on SCORM or quiz or anything they actively complete (only on resources and such)--it causes too many issues.

Average of ratings: Useful (2)
In reply to Melanie Scott

Re: Re-running the activity completion script?

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

I removed the view bit and seems to work now, thanks