Skip to content

Commit

Permalink
Merge branch 'MDL-27198-master' of git://github.com/sammarshallou/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Apr 17, 2011
2 parents c001225 + 611684a commit e87ca54
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions course/lib.php
Expand Up @@ -1637,6 +1637,16 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
// Module can put text after the link (e.g. forum unread)
echo $mod->get_after_link();

// If there is content but NO link (eg label), then display the
// content here (BEFORE any icons). In this case cons must be
// displayed after the content so that it makes more sense visually
// and for accessibility reasons, e.g. if you have a one-line label
// it should work similarly (at least in terms of ordering) to an
// activity.
if (empty($url)) {
echo $contentpart;
}

if ($isediting) {
if ($groupbuttons and plugin_supports('mod', $mod->modname, FEATURE_GROUPS, 0)) {
if (! $mod->groupmodelink = $groupbuttonslink) {
Expand Down Expand Up @@ -1721,8 +1731,11 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
}
}

// Display the content (if any) at this part of the html
echo $contentpart;
// If there is content AND a link, then display the content here
// (AFTER any icons). Otherwise it was displayed before
if (!empty($url)) {
echo $contentpart;
}

// Show availability information (for someone who isn't allowed to
// see the activity itself, or for staff)
Expand Down

0 comments on commit e87ca54

Please sign in to comment.