Import of activities and Errors

viragom
Forums
Hi there, I was wondering how to get a lot of my Moodle quiz questions in Opigno... Found a solution to automate the bulkcreation of h5ps. I'm now trying to import the h5p's into Opigno and have some questions about the opi files. What happens if an opi-file holds an activity-id that is already in use in Opigno? Say activity-id 10 is in Opigno and I try to import an opi-file which also has an activity-id set to 10? What happens is an opi-file does not have an activity-id at all? Does Opigno add the activity-id to the new imported h5p by itself? Is there more documentation about the importing function somewhere? Update on the above issues: seems like Opigno gives a new id to the imported activity, that's okay. Opigno expects the h5p in the imported opi-file to be named as interactive-content-[id].h5p. This is a little bit strange as far as I can see... It assumes that all imported h5ps were formerly exported from Opigno. Why not read the opi file for the existence of a proper h5p file and a json file? You can then name the h5ps like you want, f.i. with a coding name that says something about the content. After importing an exported activity from Opigno I get the following error: The website encountered an unexpected error. Please try again later. Error: Call to a member function getFileUri() on boolean in Drupal\opigno_module\Form\ImportActivityForm->submitForm() (line 89 of profiles/opigno_lms/modules/opigno/opigno_module/src/Form/ImportActivityForm.php). Has this something to do with the fact that I have my Opigno in a subdirectory of my website??? Seems that the real path of getFileUri function isn't retrieved so the import fails. Help very much appreciated! Thnx in advance, viragom
viragom

UPDATE on the above...

Hi! I'm working with two different installs of Opigno 2.11 1 is with a provider and resides in a SUB dir of the webroot http:\\[mysite]\opigno-2 2 is a homeserver with Ubuntu LTS 18.04 Server with apache2 The upload of activities exported from 1 in server 2 works well. The other way around it doesn't... I get a GetFileUri error which I described above It looks like Opigno2 has problems with the subdir situation. I can remember there was a similar problem with version 2.06 (also with GetFileUri). Is it possible that we have the same issue here?? Thnx!
admin

Hi viragom,

Hi viragom,

 

We will take a look at this, to try to replicate the issue.

 

Best regards