Moodle

Display of creator in course listings

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.1
  • Fix Version/s: 1.7.2
  • Component/s: Course
  • Labels:
    None
  • Affected Branches:
    MOODLE_17_STABLE
  • Fixed Branches:
    MOODLE_17_STABLE

Description

While I understand that version 1.8 has addressed this problem, the fact that creators are normally displayed in course listings is a major problem for many sites.

There is absolutely no need to display creators because this is NOT a PEDAGOGICAL role but an ADMINISTRATIVE one. I therefore suggest that the 1.7 code be patched to prevent creators from being displayed. This can easily be done with the following conditional statement:

$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.'&course='.SITEID.'">'.$fullname.'</a>';
}

See http://moodle.org/mod/forum/discuss.php?d=58606&parent=283886

Issue Links

Activity

Hide
Gustavo Muneto added a comment -

If you make this changes you eliminate the teachers creator and show the teacher e tutor.
/COURSE/LIB.PHP

função
function print_course($course, $width="100%")

linha a modificar: 1536

if ($teachers = get_users_by_capability($context, 'moodle/course:view', <<--look
'u.*, ul.timeaccess as lastaccess, ra.hidden',
'r.sortorder ASC', '','','','', false)) {
$canseehidden = has_capability('moodle/role:viewhiddenassigns', $context);
$namesarray = array();
foreach ($teachers as $teacher) {
if (!$teacher->hidden || $canseehidden) {
$roles = get_user_roles($context, $teacher->id, true, 'r.sortorder ASC');
$role = array_shift($roles); // First one
if($role->roleid>2 and $role->roleid<5){ //teacher and tutor $fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', $context)); $namesarray[] = format_string($role->name).': <a href="'.$CFG->wwwroot.'/user/view.php?id='. $teacher->id.'&course='.SITEID.'">'.$fullname.'</a>'; }
}
}

Show
Gustavo Muneto added a comment - If you make this changes you eliminate the teachers creator and show the teacher e tutor. /COURSE/LIB.PHP função function print_course($course, $width="100%") linha a modificar: 1536 if ($teachers = get_users_by_capability($context, 'moodle/course:view', <<--look 'u.*, ul.timeaccess as lastaccess, ra.hidden', 'r.sortorder ASC', '','','','', false)) { $canseehidden = has_capability('moodle/role:viewhiddenassigns', $context); $namesarray = array(); foreach ($teachers as $teacher) { if (!$teacher->hidden || $canseehidden) { $roles = get_user_roles($context, $teacher->id, true, 'r.sortorder ASC'); $role = array_shift($roles); // First one if($role->roleid>2 and $role->roleid<5){ //teacher and tutor $fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', $context)); $namesarray[] = format_string($role->name).': <a href="'.$CFG->wwwroot.'/user/view.php?id='. $teacher->id.'&course='.SITEID.'">'.$fullname.'</a>'; } } }
Hide
Thomas Robb added a comment -

The problem with the creator being displayed in course listings has been fixed thanks to the new Appearance/Course Managers setting in v. 1.8. See MDL-7544

Show
Thomas Robb added a comment - The problem with the creator being displayed in course listings has been fixed thanks to the new Appearance/Course Managers setting in v. 1.8. See MDL-7544
Hide
Helen Foster added a comment -

Resolving this issue as the course manager setting has been back-ported into 1.7 - thanks Yu

Show
Helen Foster added a comment - Resolving this issue as the course manager setting has been back-ported into 1.7 - thanks Yu

People

Vote (9)
Watch (8)

Dates

  • Created:
    Updated:
    Resolved: