Remove Topic outline

Remove Topic outline

by Gregory Evans -
Number of replies: 45
Hello,

I'm trying to remove the 'Topic Outline' header from the course screen. What would be the best way to do this?

Thanks,
GregE

Average of ratings: -
In reply to Gregory Evans

Re: Remove Topic outline

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Gregory,
Just add this declaration to one of the CSS files for your current theme (e.g. the layout.css file):
#course-view .headingblock {
display:none;
}

Joseph

In reply to Joseph Rézeau

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Remove Topic outline

by Peter Diedrichs -
Picture of Particularly helpful Moodlers

I would like to insert the full course name instead of "Topic outline", does anyone know how to do that?

In reply to Peter Diedrichs

Re: Remove Topic outline

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
See this thread.black eye
Joseph
In reply to Joseph Rézeau

Re: Remove Topic outline

by Peter Diedrichs -
Picture of Particularly helpful Moodlers

OK sorry... didn't mean to bump the forums, but this forum seemed more like the proper one for my problem and I missed that you had made an answer in the other thread.

Anyway, I made a compromise with my ambitions wink and put the course name in the theme header instead (see old thread).

In reply to Peter Diedrichs

Re: Remove Topic outline

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
That's OKapprove. Glad you managed to achieve what you wanted to do, anyway (albeit by compromising...)
Joseph
In reply to Joseph Rézeau

Re: Remove Topic outline

by Bob Scheele -
Shouldn't this be added as a button type functionality within the Admin section? Folks shouldn't have to be running around changing their stylesheet for such a basic graphical change.

Have opened up a feature request to see if it may be possible to add this at:

http://tracker.moodle.org/browse/MDL-10059

If you think it may be a good thing, visit the above and click on "Vote" on the left menu.

Cheers,

Bob
In reply to Bob Scheele

Vote for more clutter

by Jan Dierckx -

Surely adding a button for every basic graphical change is not a solution. The admin screen is already frightening most users.

In reply to Jan Dierckx

Re: Vote for more clutter

by Bob Scheele -

Jan,

Do you recommend that everyone hacks their Moodle PHP in order to be able to change a basic thing like this?  If anything would scare a user - especially ones who are not code developers - it is having to go in and change code.

This is a basic graphical thing that people should be able to change or toggle off across the whole site if they want.  If necessary, maybe there should be general User Interface menu item added to the Admin section that all of these general basic graphical change buttons can be added.

I cannot see Moodle getting wider use and support outside of the code developer community - as then they are the only ones who can be comfortable in supporting it long term - unless an effort is made to make it easier to configure and manage the look and feel of moodle from within moodle without having to resort to numerous PHP hacks - which can be a pain in the rump when upgrading Moodle in the future.

Thoughts?

Thanks,

Bob

In reply to Bob Scheele

Basic graphical changes done by changing the stylesheet

by Jan Dierckx -

Bob, I do not recommend hacking PHP code. I was talking about CSS. I totally agree with you: no one should be obliged to use PHP to make basic changes to the look and feel of Moodle. Especially because, as you point out, this will make upgrading the code more difficult.

I think basic graphical changes should be handled by adapting the stylesheet, not by adding switches and buttons to a configuration screen.

Teachers new to Moodle already have to make a lot of decisions when starting a course: which course format to use, how many topics, groups settings, structure of the course, etc... Adding an extra configuration option will make it harder for them, whereas more advanced users of Moodle willing to change the look and feel of their standard Moodle course, can perfectly do so by adding one line of CSS to their stylesheet.

In reply to Jan Dierckx

Re: Basic graphical changes done by changing the stylesheet

by Bob Scheele -
Jan,

Thanks for the thoughts - CSS is for display and I have done a fair amount of styling with this as well and agree with you from a developer standpoint. I would think for the average person/teacher, though, fiddling with a style sheet would be complex as well if they likely do not even know what one is in the first place.

If we do follow this approach, it also brings up a bevy of developer questions regarding the CSS that may be useful - if you upgrade moodle versions, does it change the CSS?

What if we change themes - I assume that changes the CSS, do I as a developer then have to remember all of the little nick/nack changes I have made before and apply them to the new CSS theme?

I would think a common irritant such as having a Topic Outline forced on every viewable course header is something many folks would like to be able to control or remove from within the confines of the application controls itself - especially if they have not worked with stylesheets.

My thought is generally if someone is confused with something they would tend to ignore this feature anyways, but why deny it for those who may need it - and in this regard only the Admin or Course Creator would be the one with access anyways?

Thanks,

Bob
Average of ratings:Useful (1)
In reply to Jan Dierckx

Re: Basic graphical changes done by changing the stylesheet

by Thomas Topham -
I agree with Jan completely. Layout should be changed in CSS. (of course it makes me happy to find such solutions because I understand CSS and how to play with it smile )
In reply to Thomas Topham

Need for a simple additional course format

by Jamie Robe -
Hi. I know this an old thread but...I too want to get rid of that "Topic Outline" heading in some of my rooms:

Wouldn't it make sense to add an additional course format, one that would be like the "Topics Format" but read "Topics Format - No header". I think I read somewhere that you can make your own formats and add them, although I have not done this yet. Seems the logical thing instead of having people new to CSS having to edit themes, just to get rid of that label that is not a label.

While we are at it, I would get rid of the numbers down the left side of each topic section in the same new format. Have you noticed how the main supports forums in moodle.org also have the topic format - with this at the top!

Topic outline

This new type would be very useful when creating rooms for non-linear materials, especially ones where you create more of a web page feel, if you know what I mean.

This solution also would have minimal confusion, at least it makes more sense to me than having the "Weekly Format" and it's twin (that the Using Moodle book warns won't even play in some browsers, etc etc etc.

Peace, Jamie


Average of ratings:Useful (1)
In reply to Jamie Robe

Re: Need for a simple additional course format

by Patrick Malley -
As the arguments above have already stated, Moodle doesn't need additional course formats, options, etc. It already has far too many choices for the layman to consume.

With proper instructions and support, anyone can add new code to a CSS document without much trouble. I don't think this is a major issue.

With that said, I always remove these headings from themes I use for my school.
In reply to Patrick Malley

Re: Need for a simple additional course format

by Glenn Finockio -

I would disagree strongly!

I'm no slouch when it comes to technology - I'd place myself in the "medium" category in terms of experience. But I'd find it very much easier to have a slew of choices on a drop-down menu in the Moodle Admin console, rather than having to hunt down the correct CSS document in a nested folder on my FTP application outside of Moodle, find the right editor to change the file, insert the correct text, and then re-upload that changed file. Imagine what a non-techie would do!

I'd say the more built-in choices, the better.

Average of ratings:Useful (1)
In reply to Joseph Rézeau

Re: Remove Topic outline

by Manpreet Sambhi -

This doesnt work in 2.0

In reply to Manpreet Sambhi

Re: Remove Topic outline

by Itamar Tzadok -

Try

h2.outline{display:none;}

And you can simply add a label on the course main page and enter the following in html mode:

<style type="text/css">h2.outline{display:none;}</style>

smile

In reply to Itamar Tzadok

Re: Remove Topic outline

by William Lu -
Picture of Particularly helpful Moodlers

Dear Itamar,

It works for me in Moodle2.0/Standard Theme. Thank you very much.

In reply to Itamar Tzadok

Re: Remove Topic outline

by William Wallace -

Is there a way to make it display the full course name in 2.0 instead of Topic Outline? I know that this could be done in previous versions.

In reply to William Wallace

Re: Remove Topic outline

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

I'm not sure how you would do that without over-riding the core renderer (which obviously could be done) - but with many themes the course title is already displayed in the header area of the page. It may be a simpler way around the issue to hide the 'Topic Outline' as previously discussed and ensure the theme displays the course name in the header.

<h1 class="headermain"><?php echo $PAGE->heading ?></h1>

Richard

In reply to Richard Oelmann

Re: Remove Topic outline

by William Wallace -

The html/css works fine if you want to hide the text. However, the html editor in moodle won't accept php code. I guess you would have to edit one of the theme's php files. Thanks anyway for the suggestion.

 

Does anyone know what would need edited in the php files?

In reply to William Wallace

Re: Remove Topic outline

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Yes,

If it's not already in there - it is in many themes -  you would need to add the line I gave in the previous post into the general.php or default.php layout file as part of the header section

e.g. in the base theme general.php layout file:

<div id="page">
<?php if ($hasheading || $hasnavbar) { ?>
<div id="page-header">
<?php if ($hasheading) { ?>
<h1 class="headermain"><?php echo $PAGE->heading ?></h1>
<div class="headermenu"><?php
if ($haslogininfo) {
echo $OUTPUT->login_info();
}
if (!empty($PAGE->layout_options['langmenu'])) {
echo $OUTPUT->lang_menu();
}
echo $PAGE->headingmenu
?></div><?php } ?>
<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
<?php } ?>
<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
</div>
<?php } ?>
</div>
<?php } ?>
<!-- END OF HEADER -->

 

HTH

Richard

In reply to Richard Oelmann

Re: Remove Topic outline

by William Wallace -

Thanks Richard, I didn't understand what you meant the first time round. Sorry, sometimes my brain works in slow mo. Anyway, that was close to what I wanted but didn't exactly fit with the theme. It did however point me in exactly the right direction. To get the look I wanted I went to the topics folder and changed a line in the format.php.

I replaced this:

echo $OUTPUT->heading(get_string('topicoutline'), 2, 'headingblock header outline');

With this:

echo $OUTPUT->heading($PAGE->heading, 2, 'headingblock header outline');

 

In reply to Joseph Rézeau

Re: Remove Topic outline

by Lisa Pedicini -

Hi Joseph --

Does this

"Just add this declaration to one of the CSS files for your current theme (e.g. the layout.css file):
#course-view .headingblock {
display:none;
}

work in 1.9.x?

Thanks for your guidance.

And in response to other comments here, changing a dropdown option to show or conceal the words "topic outline" has got to simpler for the average user than editing CSS. Average users are accustomed to working in the Moodle interface. That familiarity does not equate to having a familiarty with CSS.

In reply to Lisa Pedicini

Re: Remove Topic outline

by Itamar Tzadok -

Not even a dropdown. IMO this builtin label is completely unnecessary as labels could be easily added by the teacher where needed.

Here is one possible approach to make the 'Topic outline' disappear in the course level. Add a label on the course main page and enter the following in html mode (click the <> in the editor toolbar):

<style type="text/css">h2.outline{display:none;}</style>

 

In principle it should have been possible to eliminate it in the site level by editing the language pack, file moodle.php, and removing the respective string. But the admin interface doesn't seem to allow empty strings. A persistent admin could go directly to the moodle.php file and change it there. This would eliminate the 'Topic outline' label from the main page and leave only a thin harmless bar where the label used to be.

hth smile

Average of ratings:Useful (2)
In reply to Itamar Tzadok

Re: Remove Topic outline

by Tieku Bortei-Doku -

I like this option to hide "Topic Outline" at the course level. How can i hide the topic numbering at the course level as well?

 

Tieku

In reply to Tieku Bortei-Doku

Re: Remove Topic outline

by Itamar Tzadok -

See this post for the additional css for hiding the numbering. smile

In reply to Itamar Tzadok

Re: Remove Topic outline

by Tieku Bortei-Doku -

So i added a label on the course main page and entered the following in html mode (click the <> in the editor toolbar):

<style type="text/css">
h2.outline,
.course-content ul.topics li.section .left {
display: none;
}
</style>

 

Is that right? Did not hide topic numbering.

In reply to Tieku Bortei-Doku

Re: Remove Topic outline

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

I would add it into the html of topic0 (the topic outline) itself rather than into a label

Richard

In reply to Richard Oelmann

Re: Remove Topic outline

by Tieku Bortei-Doku -

How do I do that?

In reply to Tieku Bortei-Doku

Re: Remove Topic outline

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
  • Turn Editing On
  • In the top area of the course where you want to hide the 'Topic Outline' and numbers, click on the hand/pencil (edit icon) to edit the content of the Topic Outline / Topic0 box
  • View the html code for the content
  • Add the code you posted into the html for that area
  • Save Changes

For some reason this seems to work more consistently than putting the same code in a label - I don't know why.

This does all assume that you are not able to do this by editing the actual css, either in the theme itself or via a custom css box in that theme's settings page if it has one.

Richard

Average of ratings:Useful (1)
In reply to Richard Oelmann

Re: Remove Topic outline

by Tieku Bortei-Doku -

  i am using 1.9. Are the steps the same?

In reply to Tieku Bortei-Doku

Re: Remove Topic outline

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Yes, but ignore my comment about the custom css box - that's moodle2 smile The basic steps for editing course content are the same in both variations though

 

Take a look at this other current discussion which relates to exactly the same thing in a Moodle1.9 theme (orangewhite in that case) and Mary's comment in that discussion that she has tried it in a number of themes as well as that particular case and found it works fine.

Richard

In reply to Richard Oelmann

Re: Remove Topic outline

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I think the reason it works consitantly in Topic 0  rather than in a Label is a relational thing. In topic 0 it is directly in the page whereas in a Lable it becomes part of an object on the page, and as such can be over-ruled by the theme stylesheet.

My theory...I may be wrong.

smile

 

Average of ratings:Useful (1)
In reply to Mary Evans

Re: Remove Topic outline

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

May only be a theory Mary - but its one that makes sense.

My theory was along similar lines, that if the css is in the label, as you said it is not directly in the page itself and so the display of the topic outline/side numbers etc. is already set before the css in the label is processed, wheras in topic0 it is part of the actual page and so is processed as normal.

I don't know, but the bottom line is there is a solution that works - and in my opinion, is a neater solution than having to add a label to hold the css too smile

Of course the changes to some Moodle2 themes having the customcss setting are an even neater solution in most cases and does not have to be done on a course by course/page by page basis  - but that doesn't apply to this in 1.9

Rich

Average of ratings:Useful (1)
In reply to Richard Oelmann

Re: Remove Topic outline

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

An ideal candidate to be added as a custom setting in a theme me thinks. smile

In reply to Mary Evans

Re: Remove Topic outline

by Sarah Jane -

Hi Mary,

Sorry to bother you but I wish to remove the "topic outline" I see this was discussed in length back in 2006/7 but I do not see anything recent. May I ask how I do this - I have tried to find the css file as mentioned in 2006 but can't locate this. I wonder if the developers did indeed make this easier to move.

Regards  Sarah x

moodle 2.1.1

In reply to Sarah Jane

Re: Remove Topic outline

by foxtrot08 m -

hi, I would also like to see that option. Is there any way?

Regards

In reply to foxtrot08 m

Re: Remove Topic outline

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

You could try this Tutorial but it does have it's drawbacks.

However it does discribe how you can disable the Topics outline text. Just follow CSS Rulz.

Cheers

Mary

In reply to Mary Evans

Re: Remove Topic outline

by foxtrot08 m -

Cheers Mary,

It seems simple solution if I had an administration rights and access at my College where I work. So this solution is out of question. Is there any other way of removing that via settings?

Regards

Foxtrot

In reply to Sarah Jane

Re: Remove Topic outline

by Xelium Gmail -

For version 2.2 add the line below to the CSS file, layout.css

h2.headingblock.header.outline{display:none;}

Alternatively, if you theme supports CSS, go to the theme option and add it there. 

OR you can also add the line into the Header under 'Additional HTML' using 

<STYLE TYPE="text/css">
<!--
  h2.headingblock.header.outline{display:none;};
-->
</STYLE>

Hope this helps