core_completion_get_course_completion_status is not completed. Why?

core_completion_get_course_completion_status is not completed. Why?

by Oliver Kaiser -
Number of replies: 2

I need a Web Service to see if a participant has fully completed the course. For this I use the Web Service core_completion_get_course_completion_status.

I have a course that can be completed by the participant. I did that with the participant and get this answer from the web service.

<RESPONSE>
<SINGLE>
<KEY name="completionstatus">
<SINGLE>
<KEY name="completed">
<VALUE>0</VALUE>
</KEY>
<KEY name="aggregation">
<VALUE>2</VALUE>
</KEY>
<KEY name="completions">
<MULTIPLE>
<SINGLE>
<KEY name="type">
<VALUE>1</VALUE>
</KEY>
<KEY name="title">
<VALUE>Eigener Abschluss</VALUE>
</KEY>
<KEY name="status">
<VALUE>Ja</VALUE>
</KEY>
<KEY name="complete">
<VALUE>1</VALUE>
</KEY>
<KEY name="timecompleted">
<VALUE>1652346607</VALUE>
</KEY>
<KEY name="details">
<SINGLE>
<KEY name="type">
<VALUE>Eigener Abschluss</VALUE>
</KEY>
<KEY name="criteria">
<VALUE>Eigener Abschluss</VALUE>
</KEY>
<KEY name="requirement">
<VALUE>Selbst abgeschlossen markiert</VALUE>
</KEY>
<KEY name="status">
<VALUE/>
</KEY>
</SINGLE>
</KEY>
</SINGLE>
</MULTIPLE>
</KEY>
</SINGLE>
</KEY>
<KEY name="warnings">
<MULTIPLE> </MULTIPLE>
</KEY>
</SINGLE>
</RESPONSE>

The single criterion is complete. From my point of view, this is the end of the whole course. However, it says completed=0 at the top. 
What do you have to do in moodle so that completed=true comes out. Or am I misunderstanding the property?

Average of ratings: -
In reply to Oliver Kaiser

Re: core_completion_get_course_completion_status is not completed. Why?

by Patrick Witter -
Did you manage to figure it out as I am facing the same issue?
In reply to Patrick Witter

Re: core_completion_get_course_completion_status is not completed. Why?

by Oliver Kaiser -

Yes, we have a solution. There are tasks that have to run regularly. 

There is a completion task there. You can run it manually or configure it.

You can find them under Website-Administration -> Server -> Tasks -> Planed Tasks