Courses and course formats

Removing "Topic Outline" and numbering

 
Picture of John Lawrence
Removing "Topic Outline" and numbering
 

Dear colleagues,

I am trying to set up a new course in Moodle 2.0 and would like to remove the "Topic Outline" and "1" headers.  Is this possible?  I understand how to "hide" a topic and only have topic "1" showing right now.

Why do this?

Essentially, I am hoping to create a "home page" or a "landing page" for all other sections without users having to do the "scroll of death".

Thank-you in advance.

 
Average of ratings: -
Picture of Dietmar Wagner
Re: Removing "Topic Outline" and numbering
 

Hi John,

simply add something like

//Hide "topic outline" and section numbers in course view
.path-course-view .headingblock,
.course-content ul.topics li.section .left {
display: none;
}

to your css files (e.g. at the bottom (!) of /style/core.css).

HTH
Dietmar

 
Average of ratings: -
Picture of Carol Dobson
Re: Removing "Topic Outline" and numbering
 

I put the above suggestion into my development site running on the laptop (windows 7, firefox) and it worked a treat by adding it to my theme/pagelayout.css. Got all excited and edited the same file on the live site (windows xp, IE) and nothing happened mixed. Any ideas.

Running Moodle 2.1

 
Average of ratings: -
Picture of Carol Dobson
Re: Removing "Topic Outline" and numbering
 

Problem solved! I was trying to put the above inside the {} of the current course-content code. Put it after and presto!

 
Average of ratings: -
Picture of Tim Pohlman
Re: Removing "Topic Outline" and numbering
 

Arrgh

I put the following into my Moodle 2.1 core.css for the theme Magazine and it still keeps the Topic Outline on my pages.  Any other suggestions for me?  Thanks in advance

//Hide "topic outline" and section numbers in course view
.path-course-view .headingblock,
.course-content ul.topics li.section .left {
display: none;
}

 
Average of ratings: -
Picture of Itamar Tzadok
Re: Removing "Topic Outline" and numbering
Core developersDocumentation writersPlugin developers

If by "topic outline" you mean this

 

then the css you added is not designed to hide it. Instead you should try something like

h2.outline{display:none;}

or together with hiding the numbers

h2.outline,
.course-content ul.topics li.section .left {
display: none;
}

hth smile

 
Average of ratings: -
Picture of Tim Pohlman
Re: Removing "Topic Outline" and numbering
 

That worked!  Thank you very much big grin

 
Average of ratings: -
Picture of Shane Jeffery
Re: Removing "Topic Outline" and numbering
 

Thanks tips everyone

This seems to wo well except for one thing. 

When I add this css the ajax move button is removed as well.

Is there a way to have just the topic number removed?

 
Average of ratings: -
Picture of John St
Re: Removing "Topic Outline" and numbering
Core developersPlugin developers

you could add (underneath what you already added):

.editing .course-content ul.topics li.section .left {
display: block; color: #fff;
}

Or, don't hide the .left at all, just make the text white (which will hide it without hiding it).

I haven't tested either of the above, but they should work.

 
Average of ratings: -
Picture of Glenys Hanson
Re: Removing "Topic Outline" and numbering
 

Hi Shane,

This is what I use (thanks to Itamar) to remove Topic outline and Section numbering:

<style type="text/css">.section .left{font-size:0;}</style>
<style type="text/css">h2.outline{display:none !important;}</style>

and Ajax still works.

However, when not logged in to the course the Topic outline and Section numbers remain visible.

Cheers,

Glenys

 
Average of ratings: -
Gareth J Barnard
Re: Removing "Topic Outline" and numbering
Core developersParticularly helpful MoodlersPlugin developers

Dear all,

As the solutions for the most part appear to be changes to the css files on the server and therefore global across all topic based courses, then a much better solution is to edit '/course/format/topics/format.php' directly.  In the attached picture I have shown how this can be done with the current Moodle 2.2 version but I have left enough surrounding code for a match to other versions.  Please make a backup of this file before proceeding though.

Cheers,

Gareth


 
Average of ratings: Useful (2)
It's only an avatar...
Re: Removing "Topic Outline" and numbering
Core developersDocumentation writersParticularly helpful MoodlersPlugin developersTesters

Thanks Gareth, this will be very useful.

Perhaps you could go one better and create a new Course Format that is called "notopicoutline" smile

In fact as it is reletively easy to do this...I might have a go.

Thanks again for the tip.

Cheers

Mary

 
Average of ratings: -
Gareth J Barnard
Re: Removing "Topic Outline" and numbering
Core developersParticularly helpful MoodlersPlugin developers

Dear Mary,

No worries.

It is relativly easy to do smile - please let me know if you would like some help with it / wish me to create a version.

Cheers,

Gareth

 
Average of ratings: -
It's only an avatar...
Re: Removing "Topic Outline" and numbering
Core developersDocumentation writersParticularly helpful MoodlersPlugin developersTesters

Dear Gareth,

If you have time it would be great if you could do this.It would make a lot of Moodlers happy bunnies for Easter! smile

 
Average of ratings: -
Gareth J Barnard
Re: Removing "Topic Outline" and numbering
Core developersParticularly helpful MoodlersPlugin developers

Dear Mary,

Ok, can do.

What versions of Moodle do you all require?

Cheers,

Gareth

 
Average of ratings: -
Gareth J Barnard
Re: Removing "Topic Outline" and numbering
Core developersParticularly helpful MoodlersPlugin developers

Dear all,

Please find attached a new course format 'Slim Topics' which is the same as the 'Topics' format except that 'Topic Outline' and section numbers are removed.  This version is for Moodle 2.2 - please let me know if you require other versions (probably for 2.x+ it is a matter of changing the 'requires' value in 'version.php' to that of your Moodle version number in it's 'version.php').

A full 'Readme.txt' is included with instructions.  To use it after installation, choose 'Slim Topics format' from the list of available formats.

It took a little longer as I had to figure out how to remove the section numbers when performing an AJAX drag and drop when editing.

Cheers,

Gareth

 
Average of ratings: Useful (3)
It's only an avatar...
Re: Removing "Topic Outline" and numbering
Core developersDocumentation writersParticularly helpful MoodlersPlugin developersTesters

cheers!

Great! Thanks

 
Average of ratings: -
Gareth J Barnard
Re: Removing "Topic Outline" and numbering
Core developersParticularly helpful MoodlersPlugin developers

No problem Mary smile

 
Average of ratings: -
Gareth J Barnard
Re: Removing "Topic Outline" and numbering
Core developersParticularly helpful MoodlersPlugin developers

Slight coding issue in 'lib.php' found which manifests itself when deleting courses - please use attached - can be simply replaced.

 
Average of ratings: -
Picture of Shane Jeffery
Re: Removing "Topic Outline" and numbering
 

Hi all.  Great solution to the problem.

Is this going to be uploaded to the Moodle Course Formats Plugins area? http://moodle.org/plugins/browse.php?list=category&id=19

Will it / does it need to be updated for future versions of Moodle?

Love it!

 
Average of ratings: -
Gareth J Barnard
Re: Removing "Topic Outline" and numbering
Core developersParticularly helpful MoodlersPlugin developers

Dear Shane,

Thanks smile

I had not considered putting it on the Moodle plugin's DB because in reality it is only two line changes in code from the standard topic's format and therefore in the DB implies support and maintenance on a regular basis, something for which I endeavour to maintain for Collapsed Topics.  However, I am totally willing to put all of the code on GitHub and therefore anybody could make a Fork and maintain it.

At this current juncture in time with the discussion in this forum about Paged Formats, I think it would be worthwhile putting your thoughts there so that the functionality becomes apart of Moodle core as a course display / layout setting.

I think a full more qualified decision can be made when the Paged Course format discussion has come to an end.

Cheers,

Gareth

 
Average of ratings: -
Picture of sue sugizaki
Re: Removing "Topic Outline" and numbering
 

hi!

thx heaps! it really helped me! big grin

BR, sue

 
Average of ratings: -
Gareth J Barnard
Re: Removing "Topic Outline" and numbering
Core developersParticularly helpful MoodlersPlugin developers

Dear all,

In responce to requests etc.  I have placed the code on GitHub so you can get to it easily / fork your own version and modify:

https://github.com/gjb2048/moodle-format_slimtopics

Cheers,

Gareth

 
Average of ratings: -