Picture of Christian Wehle
Customize the URLs of the pages
by Christian Wehle - Saturday, 2 May 2020, 1:23 PM
 

Hi guys,

I just created my first course with the Authoring Tool and published the first demo on a simple webserver (without LMS). When implementing Kineo's adapt-googleAnalytics plugin and using Google Analytics to track the feedback, I experienced, that the URLs of the pages are encrypted.

Is there any possibility to customize these URLs, so that the URLs contain the content of the page itself?

I would be very grateful for your help.

Kind regards,

Chris

 

Picture of Matt Leathes
Re: Customize the URLs of the pages
by Matt Leathes - Saturday, 2 May 2020, 4:07 PM
 
I experienced, that the URLs of the pages are encrypted.

Could you explain this in a little more detail?

Typically the 'hash' part of the URL shows which page of the course is currently loaded. For example:

https://adaptlearning.github.io/v5demo/#/id/co-05

Shows that I am looking at the page with _id "co-05"

Picture of Christian Wehle
Re: Customize the URLs of the pages
by Christian Wehle - Thursday, 7 May 2020, 8:00 AM
 

Thanks for the reply, Matt. 

Is there any possibility to change these page ids?

I would love to have the urls of the chapters looking like this:

myrandomelearning.com/intro

myrandomelearning.com/definition

myrandomelearning.com/examples

...

Picture of Matt Leathes
Re: Customize the URLs of the pages
by Matt Leathes - Thursday, 7 May 2020, 6:24 PM
 

In the framework - yes, you can set these to whatever you like. in fact, you have to set them manually. So long as they are unique within the scope of the course and url-friendly...

In the authoring tool, unfortunately not. They are auto-generated. I believe there is a feature request on the roadmap to allow authors to manually set 'human-friendly ids' where necessary...

Picture of Christian Wehle
Re: Customize the URLs of the pages
by Christian Wehle - Friday, 8 May 2020, 1:49 PM
 

Thanks for the reply, Matt.

Do you think you could explain, how this can be set manually in the framework?

Picture of Simon Date
Re: Customize the URLs of the pages
by Simon Date - Friday, 8 May 2020, 1:57 PM
 

Hi Christian,

You could export your Authoring Tool export source code so you could change the page IDs at the very end of the course development before uploading to your LMS.

To do this:

  1. Go into the course.json and change the _id attribute to what you want to name it.
  2. Change the _parentId in article.json to match it.
  3. Run the framework to test that change has worked correctly.

I would recommend using the Find and replace features in your text editor to make it easier.

Picture of Matt Leathes
Re: Customize the URLs of the pages
by Matt Leathes - Saturday, 9 May 2020, 3:47 PM
 
Go into the course.json and change the _id attribute to what you want to name it

Should be contentObjects.json rather than course.json

You would do this in src/course/contentObjects.json then use either the grunt dev or grunt build command (the latter if if you want to do a 'production-ready' build with source maps removed and all code 'minified' for fast download).

There's a guide to exporting your source code from that AAT for use in the Framework here.

Picture of Christian Wehle
Re: Customize the URLs of the pages
by Christian Wehle - Wednesday, 13 May 2020, 2:51 PM
 

Awesome, guys, thank you very much for this information!

 

Chris