Scorm and restrict access activity problem

Scorm and restrict access activity problem

от Davide Davide -
Number of replies: 7

Hello everybody, I noticed a strange behaviour in my moodle site.

I inserted a scorm activity and a feedback one, dependent on completion of the first, as in the image, in a course.

The feedback is invisible until the "restrict access" logic were encountered.

The scorm activity to be considered completed, need the students to see it.
After exit from the scorm activity with the the top link in the page, I return in the course's topic, but the feedback activity doesn't appear until you refresh the page one more time.


I can fix this situation by inserting an hidden iframe in the scorm player that load the course section, so that one refresh has already done, and the student coming out from the scorm, can see the feedback activity correctly without need to refresh the page.

Has somebody already had this kind of problem?
I have tried various changes to PHP sources without any results ...

I hope that my description of the problem was clear, and I apologize for my poor english. усмивка
In reply to Davide Davide

Re: Scorm and restrict access activity problem

от Edward Gillian -

Hello,

Have you resolved your problem with restrict access?




I posted a query in General help on October 24 2016 about problems with restrict access but have had not responses. This message has attachments of screenshots for the missing activities.

I am running a course on a server with Moodle 3.1.1+ (Build: 20160817).


Below quotes my message from General help:

The course has many conditional access activities programmed through restrict access for each SCORM module.

When I checked the SCORM modules today, all of the conditional activities which had a grade restriction or restriction set were missing the activities (see condition error 1 screen shot). The restrictions for % were intact (see condition error 2 screen shot). All the conditional activities with activity completion were OK.

When I checked again what was happening, that day I had an intermittent Internet connection and at one stage got a message that the SCORM player could not update the Moodle DB. The message said:

The SCORM player has determined that your Internet connection is unreliable or has been interrupted. If you continue in this SCORM activity, your progress may not be saved.
You should exit the activity now, and return when you have a dependable Internet connection.

I posted this as a bug but Dan Marsden dismissed it as not a bug. I am going to load my e-course onto Moodle Cloud and test it. If it does not work, I will be looking for an alternative LMS to Moodle.

Best regards,

Edward


In reply to Edward Gillian

Re: Scorm and restrict access activity problem

от Davide Davide -
Hi Edward, thanks for your response.
Unfortunately the problem still persist, the only "solution" I found is to load the course's topic page one more time, to enable the dependant activities.
This is not a real fix, but for now it just works...

best regards,
Davide
In reply to Davide Davide

Re: Scorm and restrict access activity problem

от Edward Gillian -

Hi Davide,

How are you reloading the topic page? I was thinking I may have to do the same for my problem.

In reply to Edward Gillian

Re: Scorm and restrict access activity problem

от Davide Davide -

Hi Edward,

I added an hidden iframe pointing the course page containing the scorm link, inside the scorm player php script, and reloading the iframe with an interval in javascript.
It's not a big solution, but it works quite good in most cases...

Hope this can help you.

Davide

In reply to Davide Davide

Re: Scorm and restrict access activity problem

от Edward Gillian -

Hi Davide,

Can you send me the code and where to put the code exactly in the scorm player php script? I am not very familiar with php and java script.

Best regards,

Edward


In reply to Edward Gillian

Re: Scorm and restrict access activity problem

от Davide Davide -

Hi Edward,

try put this little snippet inside your /mod/scorm/player.php, just before $OUTPUT->footer()

---------------

?>

<iframe id="courseframe" src="<?php echo "$CFG->wwwroot/course/view.php?id=".$course->id; ?>" height="1px" width="1px" style="display: none;" ></iframe>
<script type="text/javascript">
    var iframe = document.getElementById('courseframe');
    setInterval(function(){ iframe.src = iframe.src; }, 5000);
</script>

<?php

echo $OUTPUT->footer();

---------------

This is a dirty and quick way, hope it help.

Davide