androidnoob
androidnoob

Reputation: 23

How to remove Moodle Logo in version 2.8

Have just created a new Moodle page documentation. However, I would like to remove the Moodle logo that is shown in the footer. How can that be achieved? I have tried looking in admin/styles directory and also to try to change the image in pix/ moodlelogo.gif directory. However, none of those method seems to work.

Upvotes: 0

Views: 2673

Answers (1)

Dmitriy Olhovsky
Dmitriy Olhovsky

Reputation: 141

There are two solutions:

I. First (hack Moodle core):

  1. go to [moodle dir]\lib\outputrenderers.php
  2. find public function home_link()
  3. and replace it code:

    public function home_link() {
    global $CFG, $SITE;
    
    if ($this->page->pagetype == 'site-index') {
        // Special case for site home page - please do not remove
        return '';
    } else if (!empty($CFG->target_release) && $CFG->target_release != $CFG->release) {
        // Special case for during install/upgrade.
        return '';
    
    } else if ($this->page->course->id == $SITE->id || strpos($this->page->pagetype, 'course-view') === 0) {
        return '<div class="homelink"><a href="' . $CFG->wwwroot . '/">' .
                get_string('home') . '</a></div>';
    
    } else {
        return '<div class="homelink"><a href="' . $CFG->wwwroot . '/course/view.php?id=' . $this->page->course->id . '">' .
                format_string($this->page->course->shortname, true, array('context' => $this->page->context)) . '</a></div>';
    }
    }
    

II. Second (simple hide logo):

  1. Add to your css file (for example "custom.css") next lines :

    .sitelink {
        display: none;
    }
    

But remember: deleting moodle logo (free open source software) not good idea!

Upvotes: 1

Related Questions