Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-27198-m20' of git://github.com/sammarshallou/moodle…

… into MOODLE_20_STABLE
  • Loading branch information...
commit f6bf9c932d26b509e36a3fee5e03976632a1e581 2 parents 1fb2369 + ca090f3
@skodak skodak authored
Showing with 15 additions and 2 deletions.
  1. +15 −2 course/lib.php
View
17 course/lib.php
@@ -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) {
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.