Hide module Collapse Topic Button in Moodle 2.0 > Formal_White

Hide module Collapse Topic Button in Moodle 2.0 > Formal_White

by Micky Fokken -
Number of replies: 1

My students are collapsing the module topics.  I need to disable this button.

This forum shows how to hide the Collapse Topics button in Moodle standard.

http://moodle.org/mod/forum/discuss.php?d=10468

"Paste the code below into styles_layout.css

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

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

Moodle 2.0.2+, Formal_white theme doesn't have a styles_layout.css file.

QUESTION:  Where would I put this code?  Would this code work in Moodle 2.0?

Average of ratings: -
In reply to Micky Fokken

Re: Hide module Collapse Topic Button in Moodle 2.0 > Formal_White

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Micky,

Assuming you mean the 'show only topic x' functionality, go to /course/format/topics, make a backup of format.php then edit format.php and remove lines 181 -> 188, i.e. the following code:

 

if ($displaysection == $section) {    // Show the zoom boxes

echo '<a href="view.php?id='.$course->id.'&amp;topic=0#section-'.$section.'" title="'.$strshowalltopics.'">'.                 '<img src="'.$OUTPUT->pix_url('i/all') . '" class="icon" alt="'.$strshowalltopics.'" /></a><br />';

} else {

$strshowonlytopic = get_string("showonlytopic", "", $section);            echo '<a href="view.php?id='.$course->id.'&amp;topic='.$section.'" title="'.$strshowonlytopic.'">'.                 '<img src="'.$OUTPUT->pix_url('i/one') . '" class="icon" alt="'.$strshowonlytopic.'" /></a><br />';

}

 

I hope this helps, cheers,

Gareth