Progress Bar block

Progress Bar block

by Nikki Macfarlane -
Number of replies: 1

I am using this in a Moodle 2.0 installation. It works beautifully for the students and also for the manager level teacher. But lower level teachers do not see the link "Overview of Students" so they cannot view their own students. I rad through the documentation and it seems that this is supposed to work for trainers so they can see their own students. Any ideas?

Thanks.

Average of ratings: -
In reply to Nikki Macfarlane

Re: Progress Bar block

by Nikki Macfarlane -

OK so I have looked in to this further and it looks like the block is controlling who can see the overview with this code from line 138:

        if (has_capability('moodle/course:update', $this->context)) {
            $this->content->text .= $OUTPUT->spacer(array('height'=>5),true);
            $this->content->text .= '<p><a href="'.$CFG->wwwroot.
            '/blocks/progress/overview.php?id='.$this->instance->id.'&courseid='.$COURSE->id.
            '">'.get_string('overview','block_progress').'</a></p>';
        }

This is allow editing teachers and admins to see the overview. However, I want all teachers, including non-editing to see the overview. I cannot find what the code for has_capability should be to allow all teachers.

Also, I only want teachers to see the students in their own group. At the moment, the editing teachers can see all students. Is there any way of changing this so only students in the same group as the teacher appears, or to have a drop down where you can select the group and then display those students only?

Average of ratings: Useful (1)