Picture of Bjoern Nira
Including Adapt WBT in Web Framework such as CodeIgniter
by Bjoern Nira - Thursday, 14 July 2016, 8:54 AM
 

Hi,

i was thinking about including an exported learning module created with the Adapt Authoring Tool into a Website build with a Webframework. Unfortunately several path errors came up. I could fix some of them adapting the path to several css and/or js files. But it seems, that there are also paths set in "internal" js files in the built package I exported vie the Webinterface.

Is there anyone out, already included a training into a Website or have any idea how to fix it?

Cheers

Picture of Nick Webb
Re: Including Adapt WBT in Web Framework such as CodeIgniter
by Nick Webb - Thursday, 14 July 2016, 9:41 AM
 

I'm pretty sure published courses in Adapt only use relative paths (SCORM wouldn't work otherwise) unless your content includes an absolute path to an external media item. 

So as long as you put the whole package in the same location it should work fine without needing to recode any URLs.

Nick

Picture of Bjoern Nira
Re: Including Adapt WBT in Web Framework such as CodeIgniter
by Bjoern Nira - Thursday, 14 July 2016, 10:29 AM
 

hum...

My arch is as follow:

app_root
-assets
--js
--css
-application
--controller
---learning.php
...
-view
--adapt_exported_unzipped_folder
---main.html (which i changed to main.html.php because my controller only loads php views)

In the Main I already changes the reltative paths to absolute paths to reach the assets folder in the root, by the way without changing anythig on the adaptfiles it also did not work in my environment.

I also left all js and css folders within the adapt folder.

After changing the paths in the main.html.php I am able to see the loading wheel but receive a 404 for the "config.json" file.

 

I call the controller by:

uri/index.php/controllerName

 

Maybe someone has any idea...I am fully stucked...guess it's just a tiny thing I missconfigured or I am not able to figure out.

Regarding the relative paths...I think that could be a Problem as the view is loaded into controller, which is not in the same root dir as all the adapt files.

Picture of Bjoern Nira
Re: Including Adapt WBT in Web Framework such as CodeIgniter
by Bjoern Nira - Monday, 18 July 2016, 7:22 AM
 

Maybe someone has another idea?

Picture of Matt Leathes
Re: Including Adapt WBT in Web Framework such as CodeIgniter
by Matt Leathes - Monday, 18 July 2016, 11:30 AM
 

The path to config.json (and all the other .json files) can be found in app.js

If you really do need to change adapt from using relative to absolute paths then you're going to have to change more than just main.html as these paths are scattered everywhere.

Perhaps it might be better to take a different approach, maybe trying a <base> tag for example?