Remove moodle logo if site title is displayed

Issue #64 resolved
Info 3bits created an issue

If set the title to show the default moodle logo remains in header.

Comments (11)

  1. Jeremy Hopkins

    There is already an option to show / hide the site title.

    I think the option to hide logo should also be an option as the logo / site title can be different. Just because you show the site title does not mean you dont also want a logo, particuarly if it is just a logo with no text?

  2. Info 3bits reporter

    I agree that the options are: - logo - sitetitle - logo and sitetitle

    If you want to display only the sitetitle then the white moodle logo is also displayed. BCU_logo.png

  3. Jeremy Hopkins

    Sorry I am confused, I would have thought with the options you suggest were actually along the lines of:

    • logo only - shows only logo, no site title
    • sitetitle only - shows only site title with no logo
    • logo and site title - shows both

    As such displaying "sitetitle" would not display the logo as your last comment suggests?

  4. Info 3bits reporter

    Add the sitetitle and see what happens. The default moodle logo is still displayed beside the title. The logo should be displayed only when added.

    If I want to display the name of my site only, it would be in bold and without the default logo.

    Probably the problem is the default logo itself that is always displayed.

  5. Jeremy Hopkins

    Ok I dont think this needs a new setting at all. The problem is you cannot get rid of the default Moodle logo. It is supposed to be the case that you can upload your own, the Moodle one was only intended as a placeholder until someone updates their site with a new logo.

    So, I think removing that default image completely so that it ONLY shows a logo if you upload one, and removes it if you delete that image would work?

    Or perhaps this is what you meant?

  6. Info 3bits reporter

    But if I don't want to use a logo only a title then both are displayed.

    Try to use the sitetitle only.

  7. Jeremy Hopkins

    If you dont want to use a logo then you wouldnt upload one. The problem is its showing a default "Moodle" logo when you dont upload, or if after you have uploaded a logo it is deleted. What I am saying is that we should ONLY show a logo if the administrator uploads one. The screen recording below explains this in more detail (if it is blury rewind or download the video, one drive playback isnt great):

    http://1drv.ms/1RaUcgg

  8. Jeremy Hopkins

    Ok look at line 206 in in /bcu/layout/includes/header.php and you will see:

         <?php if ($haslogo) { ?>
                <a href="<?php p($CFG->wwwroot) ?>"><?php echo "<img src='".$PAGE->theme->setting_file_url('logo', 'logo')."' alt='logo' id='logo' />"; echo "</a>";
            } else { ?>
                <a href="<?php p($CFG->wwwroot) ?>"><img src="<?php echo $OUTPUT->pix_url('2xlogo', 'theme')?>" id="logo"></a>
            <?php } ?>
    

    The problem is the "else" statement which ALWAYS loads a default logo if one has not been uploaded.

    Removing that "else" should mean you can delete the logo, or not upload one and nothing will display?

  9. Log in to comment