Hi all,
Inspired by the blog post of Paolo Oprandi "Making Moodle More Engaging By Rethinking The Display of Content” (21.10.2013) I wanted to find out how much I can accomplish with Javascript in order to provide a different (hopefully better) user experience. I use the Clean theme with collapsed topics in my local installation of Moodle 2.7. My goal was to display as much content as possible without leaving the page, but this content should not be visible all the time.
When students open the course page, it will look like this.
After they clicked on "click-to-reveal content,” users will see the content and, if it's an activity, they will also see a button to start the activity.
Here are the steps to get a customized course layout:
- Download jquery.shorten.js from https://github.com/viralpatel/jquery.shorten/blob/master/src/jquery.shorten.js and add the file to folder \theme\bootstrapbase\javascript.
- Add the following lines in \theme\bootstrapbase\config.php
$THEME->javascripts_footer = array(
'jquery.shorten'
);
after
$THEME->javascripts_footer = array(
'moodlebootstrap', 'dock'
);
- Select "show description” in Edit settings of activities, which will display the description on the course page.
- Add code of one of the attached sample files either in the description of an activity in Edit settings or in a Label. Search for "your_site” in the sample file and replace it with the name of your site, if necessary.
Any comments are very welcome. If this post is not in the correct forum, I kindly ask the forum moderators to move the post to the appropriate forum.
With kind regards,
Hartmut