1.7 upgrade - courses now show list of all course creators

Re: 1.7 upgrade - courses now show list of all course creators

by Thomas Robb -
Number of replies: 5
One simple way to remove the course creators until version 1.8 becomes available for general use is to tweak the code -- if you have access to it. The file that needs modification is moodle/course/lib.php. Around line 1558 you will find the following code. (You don't have to count lines -- just search for it)

$role = array_shift($roles); // First one
$fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', $context));
$namesarray[] = format_string($role->name).': <a href="'.$CFG->wwwroot.'/user/view.php?id='.
teacher->id.'&amp;course='.SITEID.'">'.$fullname.'</a>';

Put an "if" statement around these lines like this:

$role = array_shift($roles); // First one
if ($role->roleid > 2){
$fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', $context));
$namesarray[] = format_string($role->name).': <a href="'.$CFG->wwwroot.'/user/view.php?id='.
$teacher->id.'&amp;course='.SITEID.'">'.$fullname.'</a>';
}

In reply to Thomas Robb

Re: 1.7 upgrade - courses now show list of all course creators

by Thomas Robb -
While I understand that version 1.8 has addressed the problem of creators being displayed in course listings, the fact that they are normally displayed in course listings is a major problem for sites using version 1.7.

There is absolutely no need to display creators because this is NOT a PEDAGOGICAL role but an ADMINISTRATIVE one. I have therefore suggested in the Tracker that the 1.7 code be patched to prevent creators from being displayed.

(Even for version 1.8, the default behavior should be set so that creators are not displayed...)

If you agree that this is behavior is a nuisance, please vote for MDL-8222!
In reply to Thomas Robb

Re: 1.7 upgrade - courses now show list of all course creators

by Jeff Herman -
Thomas,

I'm not clear. What's is this tweak to the code supposed to do? I expected to see changes to the Participants screen with this change, but nothing happened.
In reply to Jeff Herman

Re: 1.7 upgrade - courses now show list of all course creators

by Russell Myers -
I agree jeff, I tried the mod and nothing changed in my participants list. Is the mod used to remove all course creators from the course list?

Does anyone have a fix for all course creators showing up in the participants list?
In reply to Russell Myers

Re: 1.7 upgrade - courses now show list of all course creators

by Thomas Robb -
There are actually TWO places in Moodle where creators are undesirably listed. One is in the display of categories and the courses within them. It is this display that my suggested tweak of moodle/course/lib.php will (temporarily) fix in version 1.7. It is mentioned in this posting:

http://moodle.org/mod/forum/discuss.php?d=58606#283886

The other location is at the top of the participants' listing inside each course. The patch suggested in this posting will take care of that:

http://moodle.org/mod/forum/discuss.php?d=63569

To reiterate what I have said elsewhere, the "creator" role is an administrative, not pedagogical role, and IMHO should thus not appear anywhere on the site when logged in as a student.