Administratrion block inconsistent

Administratrion block inconsistent

by Nikki Macfarlane -
Number of replies: 7

I am running Moodle 1.5

Problem I have is that the administration block appears differently on different users pages. For example, my students get a field to click on where they can edit their password but this does not appear on my teachers administratikon blocks. Can anyone tell me what setting I have incorrect here.

Thanks, Nikki

Average of ratings: -
In reply to Nikki Macfarlane

Re: Administration block inconsistent

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Nikki,

From what you describe, things are how they should be. smile Is there anything in particular that you would like to change?

There has been some discussion re. links in the Administration and People blocks - Groups, Teachers, Students links - however AFAIK nothing has yet been decided.
In reply to Helen Foster

Re: Administration block inconsistent

by Nikki Macfarlane -

Thanks Helen. A little confused now! This means that my teachers cannot edit their password at all. They are non editing teachers and so the admin block does not have a place for them to change their username and password, but it does for the students.

Is there a differnt place for teachers or are they just not able to? Seems odd that students can do something non editing teachers can't.

nikki

In reply to Nikki Macfarlane

Re: Administration block inconsistent

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Yes, it's confusing that students have a change password link in their Administration block and teachers haven't. thoughtful

However, please note that both students and teachers have a change password button on their profile page. smile
In reply to Helen Foster

Re: Administration block inconsistent

by Nikki Macfarlane -
Thanks Helen. This is where i am struggling. When I sign in as a teacher there is no edit profile section in any part fo the screen or blocks. Have I not checked something somewhere? The administrator has this button as do the students, but not the non-editing teachers.

Nikki
In reply to Nikki Macfarlane

Re: Administration block inconsistent

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Oops, sorry I didn't explain where the profile page may be found! clown

At the top and bottom of most pages it says "You are logged in as 'your name'". Following the 'your name' link will take you to your profile page. This applies whether you're a student, editing or non-editing teacher or an administrator. smile
In reply to Helen Foster

Re: Administration block inconsistent

by Nikki Macfarlane -
Thanks Helen. I can see now how the teachers can edit their own profile. pretty horrid way to do it though - would be much cleaner if they had the same way to edit their profile as students and admin do - simply through an icon in the admin block. This seems like a real flaw for this level of access.

I tried to see if I could add the html code to the admin block manually so teachers got this option. However, the line of code has the id number for the person already in it and I cannot see where it is picked up from so this can be changed. Anybody ever tried to add the edit profile line themselves manually into the admin block?

Nikki
In reply to Helen Foster

Re: Administration block inconsistent

by Nikki Macfarlane -
OK - I have finally found a way to correct this. I wanted teachers (non editing) to be able to change their profile from the admin block in the same way that editing teachers and students could do - without having to click on the link at the bottom of the page.

I edited moodle/blocks/admin/block_admin.php

I went to the line that reads:

        if (isteacher($this->instance->pageid)) {

If you scroll down a few lines, underneath the line:

            if ($isteacheredit) {

you will see the following lines:

            $fullname = fullname($USER, true);
            $editmyprofile = '<a title="'.$fullname.'" href="'.$CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&amp;course='.$this->instance->pageid.'">'.get_string('editmyprofile').'</a>';
            if (empty($USER->description)) {
                $this->content->items[]= $editmyprofile." <blink>*</blink>";
            } else {
                $this->content->items[]= $editmyprofile;
            }
            $this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" height="16" width="16" alt="" />';

I simply moved all of these lines so they can underneath:

        if (isteacher($this->instance->pageid)) {

and came before:

            if ($isteacheredit) {

This worked a treat. Have tested it and it seems ot be working everywhere just fine.

Relief!

Nikki