Pages

Friday, August 24, 2012

Three ways to disable the "Show only one topic / Show all topics" icon in Moodle 1.9

Ever had this need?



In a topics-format course, the "Show only topic N" and "Show all topics" icons present a usability issue. Students who inadvertently click on them become confused when they lose sight of the the other blocks. It would be good if we could disable these icons, either at System or Course level, or perhaps through a new capability.
(John Isner from this Moodle tracker).

In this post I want to present FOUR ways of disabling the "Show only week N" icon



and its sibling, the "Show all weeks" icon.


Method1 - make the icons invisible!




"The simplest solution I have found is to take the two graphics 'one.gif' and 'all.gif', which are currently white squares with a black border. Make them transparent in your favourite graphics package. They will then be invisible to everyone, but those who know can hover over the place they live, see the pointer change and still use them" 

(Edward Beckmann on http://moodle.org/mod/forum/discuss.php?d=99567)

The gif files are found in /moodle/pix/i of your Moodle 1.9 site.
I've created the invisible versions here for you to download.


Method 2 - change CSS code






"Having one long scrolling page that you jump up and down (or expand and collapse in this case) was popular on the web circa 1996"
(Thomas Haney on http://moodle.org/mod/forum/discuss.php?d=192117)

Try this. In Moodle 2.0, add this code to theme CSS file

/* Show all topics icon is confusing so remove it  */
.course-content .topics li .right a {
display: none;
}


In Moodle 1.9, edit the styles_select.css file of your theme.

#course-view .section .right.side a {
display:none;
}
.editing#course-view .section .side a {
display:inline;
}


Method 3 - patch the topics format file


Edited the /moodle/course/format/topics/format.php based on this Moodle tracker's patch file.

There are only 3 places in format.php to add in code. Each time, the code insert is just one line. Please back up the original /moodle/course/format/topics/format.php file to format_ori.php as a precaution.



and



That's it. No more ""Show only one topic / Show all topics" icon.


Method 4 - and now for something completely different...
There is another option to avoid the scroll of death which is found here:



regards
Frankie Kam


If you like this post or site
a small donation would be nice but would last only a day,
otherwise leaving a comment (or a compliment) below will last me a month!

1 comment:

  1. I have just moved to Moodle 2.0 and wanted to know if these are the same ways to disable the Show all topics.

    ReplyDelete

Ratings and Recommendations by outbrain