Moodle / H5P Activity Completion

Hi all,

I am finding that when a Moodle user completes a Moodle quiz or activity, another Moodle page can be automatically unlocked.

However when a user completes an H5P activity, the next page is not automatically unlocked. The user needs to click on another page for Moodle to realise that the previous activity has been completed.

For example.

If I have a Moodle page with a 'Restrict Access' 'Student Must Match the following' - Activity Completion - Exercise 6 - Must be completed with a pass grade.

If Exercise 6 is an H5P activity, when the user completes the ativity, the restricted page is not unlocked automatically. The user needs to click another previously unlocked page for Moodle to realise that the Activity was completed.

Please let me know if that makes enough sense or if I should elaborate.

 

Thanks

 

 

 

 

BV52's picture

Hi GameTraining,

Can you please elaborate on what settings determines a page/content locked and what/how it is unlocked. Is this somehow dependent on "activity completion" which H5P activities provide.

You mentioned that this can be unlocked by using a Moodle quiz or activity automatically. Does this reload the page or are there some AJAX requests unlocking the next page ?

-BV52

 

Hi there,

Sorry for my delayed reply.

Here is an example:

I have an h5P Quiz (Question Set) with 3 questions.

Grade

Grade to pass: 10

Maximum Grade: 10

Activity Completion

Require View - Student must complete activity to complete it - Checked

Require Grade - Student must receive a grade to complete this activity - Checked

/////////

On the following section we are using:

Restrict Access

Student [must] match the following

Activity completion [Section 1] must be completed with a pass grade.

/////////

This is what is happening. The student completes the Section 1 activity with a perfect score 10/10 and Section 2 does not appear in the left hand main navigation menu. However as soon as the student clicks the Section 1 link in the main navigation menu, the Section 2 link suddenly appears.

However in any activities which do not use the H5p plugin, when a quiz for example is completed, the next section link instantly appears on the main navigation menu.

It would be wonderful if after completing an H5p activity the next section was able to dynamically update the main navigation menu in the same way the standard Moodle activities can. I'm sure it can and I assume I'm doing something wrong.

 

Any help would be great thanks.

 

 

 

thomasmars's picture

Hi, Thanks for elaborating on this.
Currently H5P just tells Moodle what score it has received, it does not refresh the page or send special AJAX requests to Moodle, which I assume is required in order to refresh the navigation menu, so in order to have this it would have to be implemented.
Feel free to create an issue in the open JIRA issue tracker or on GitHub.

Any update or workaround for this? Our courses strongly rely on restriction to proceed further after finishing H5P content.

BV52's picture

Hi lukaskotik,

I wish I have good news for you but no one has created this feature yet.

-BV

Thanks for the response! Any workaround for this? It seems to me only refresh of the page or part of the page is needed. Could placing somewhere something like $("#next-activity").load(document.URL + "#next-activity") work? #next-activity is div with naviagion button.

EDIT: If anyone suffers from this issue the workaround solution is to reload the "next activity" button in regular intervals.. It can be done by inserting in HTML mode the following lines into the descrption of H5P content:

<script>
function refresh_next() {
$('#next-activity').load(document.URL + ' #next-activity>*'); // reload the the div with next activity button (id of the div is #next-activity)
}
setInterval(refresh_next, 3000); // The function refresh_next is going to be calles every 3000 msec.
</script>