diff --git a/blocks/admin/block_admin.php b/blocks/admin/block_admin.php index 4284cc3024a..23f31d93df8 100644 --- a/blocks/admin/block_admin.php +++ b/blocks/admin/block_admin.php @@ -50,7 +50,7 @@ class block_admin extends block_list { /// Course editing on/off if (has_capability('moodle/course:update', $context) && ($course->id!==SITEID)) { - $this->content->icons[]=''; + $this->content->icons[]=''; if (isediting($this->instance->pageid)) { $this->content->items[]=''.get_string('turneditingoff').''; } else { @@ -58,7 +58,7 @@ class block_admin extends block_list { } $this->content->items[]=''.get_string('settings').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } @@ -66,7 +66,7 @@ class block_admin extends block_list { if (has_capability('moodle/role:assign', $context)) { $this->content->items[]=''.get_string('assignroles', 'role').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } @@ -75,11 +75,11 @@ class block_admin extends block_list { if (has_capability('moodle/course:managemetacourse', $context)) { $strchildcourses = get_string('childcourses'); $this->content->items[]=''.$strchildcourses.''; - $this->content->icons[]=''; + $this->content->icons[]=''; } else if (has_capability('moodle/role:assign', $context)) { $strchildcourses = get_string('childcourses'); $this->content->items[]=''.$strchildcourses.''; - $this->content->icons[]=''; + $this->content->icons[]=''; } } @@ -89,57 +89,57 @@ class block_admin extends block_list { if (($course->groupmode || !$course->groupmodeforce) && has_capability('moodle/course:managegroups', $context) && ($course->id!==SITEID)) { $strgroups = get_string('groups'); $this->content->items[]=''.$strgroups.''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Backup this course if (has_capability('moodle/site:backup', $context)) { $this->content->items[]=''.get_string('backup').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Restore to this course if (has_capability('moodle/site:restore', $context)) { $this->content->items[]=''.get_string('restore').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Import data from other courses if (has_capability('moodle/site:import', $context) && ($course->id!==SITEID)) { $this->content->items[]=''.get_string('import').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Reset this course if (has_capability('moodle/course:reset', $context) && ($course->id!==SITEID)) { $this->content->items[]=''.get_string('reset').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// View course reports if (has_capability('moodle/site:viewreports', $context) && ($course->id!==SITEID)) { $this->content->items[]=''.get_string('reports').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Manage questions if (has_capability('moodle/question:manage', $context) && ($course->id!==SITEID)) { $this->content->items[]=''.get_string('questions', 'quiz').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Manage scales if (has_capability('moodle/course:managescales', $context) && ($course->id!==SITEID)) { $this->content->items[]=''.get_string('scales').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Manage files if (has_capability('moodle/course:managefiles', $context) && ($course->id!==SITEID)) { $this->content->items[]=''.get_string('files').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } /// Authorize hooks @@ -152,23 +152,23 @@ class block_admin extends block_list { } } $this->content->items[] = $paymenturl; - $this->content->icons[] = ''; + $this->content->icons[] = ''; } /// View course grades (or just your own grades, same link) if ((has_capability('moodle/course:viewcoursegrades', $context) or (has_capability('moodle/user:viewusergrades', $context) && $course->showgrades)) && ($course->id!==SITEID)) { $this->content->items[]=''.get_string('grades').''; - $this->content->icons[]=''; + $this->content->icons[]=''; } if (empty($course->metacourse) && ($course->id!==SITEID)) { if (has_capability('moodle/legacy:guest', $context, NULL, false)) { // Are a guest now $this->content->items[]=''.get_string('enrolme', '', $course->shortname).''; - $this->content->icons[]=''; + $this->content->icons[]=''; } else if (has_capability('moodle/role:unassignself', $context, NULL, false)) { // Have some role $this->content->items[]=''.get_string('unenrolme', '', $course->shortname).''; - $this->content->icons[]=''; + $this->content->icons[]=''; } } diff --git a/blocks/admin/styles.php b/blocks/admin/styles.php deleted file mode 100644 index 20de2f1fc89..00000000000 --- a/blocks/admin/styles.php +++ /dev/null @@ -1,4 +0,0 @@ -.block_adminblock .content { - text-align: center; - padding: 10px; -} diff --git a/blocks/admin_tree/block_admin_tree.php b/blocks/admin_tree/block_admin_tree.php index 48b478d2921..68c01359721 100644 --- a/blocks/admin_tree/block_admin_tree.php +++ b/blocks/admin_tree/block_admin_tree.php @@ -81,8 +81,6 @@ class block_admin_tree extends block_base { $this->open_folder($content->visiblename); - unset($entries); - $entries = array_keys($content->children); foreach ($entries as $entry) { @@ -113,8 +111,6 @@ class block_admin_tree extends block_base { // we need to do this instead of $this->build_tree($adminroot) because the top-level folder // is redundant (and ideally ignored). (the top-level folder is "administration".) - unset($entries); - $entries = array_keys($adminroot->children); asort($entries); diff --git a/blocks/messages/block_messages.php b/blocks/messages/block_messages.php index 0c22e0d43c8..3d211854155 100644 --- a/blocks/messages/block_messages.php +++ b/blocks/messages/block_messages.php @@ -38,15 +38,15 @@ class block_messages extends block_base { $this->content->text .= ''; } else { - $this->content->text .= '
'; + $this->content->text .= '
'; $this->content->text .= get_string('nomessages', 'message'); $this->content->text .= '
'; } diff --git a/blocks/online_users/block_online_users.php b/blocks/online_users/block_online_users.php index b7c2a2627f6..ccac195c536 100644 --- a/blocks/online_users/block_online_users.php +++ b/blocks/online_users/block_online_users.php @@ -84,7 +84,7 @@ class block_online_users extends block_base { //Calculate minutes $minutes = floor($timetoshowusers/60); - $this->content->text = "
(".get_string("periodnminutes","block_online_users",$minutes).")
"; + $this->content->text = "
(".get_string("periodnminutes","block_online_users",$minutes).")
"; //Now, we have in users, the list of users to show //Because they are online @@ -96,23 +96,24 @@ class block_online_users extends block_base { $this->content->text .= '
  • '; $timeago = format_time(time() - max($user->timeaccess, $user->lastaccess)); //bruno to calculate correctly on frontpage if ($user->username == 'guest') { - $this->content->text .= print_user_picture($user->id, $COURSE->id, $user->picture, 16, true, false).' '; - $this->content->text .= get_string('guestuser'); + $this->content->text .= '
    '.print_user_picture($user->id, $COURSE->id, $user->picture, 16, true, false, '', false); + $this->content->text .= get_string('guestuser').'
    '; } else { - $this->content->text .= print_user_picture($user->id, $COURSE->id, $user->picture, 16, true).' '; - $this->content->text .= ''.$user->fullname.''; + $this->content->text .= ''; } if (!empty($USER->id) and ($USER->id != $user->id) and !empty($CFG->messaging) and !isguest() and $user->username != 'guest') { // Only when logged in and messaging active etc - $this->content->text .= "\n".' ' - .''. get_string('messageselectadd') .''; + $this->content->text .= ''; } $this->content->text .= "
  • \n"; } - $this->content->text .= "\n"; + $this->content->text .= '
    '; } else { - $this->content->text .= "
    ".get_string("none")."
    "; + $this->content->text .= "
    ".get_string("none")."
    "; } return $this->content; diff --git a/blocks/rss_client/block_rss_client.php b/blocks/rss_client/block_rss_client.php index c2c99148270..f6177a2f0dd 100644 --- a/blocks/rss_client/block_rss_client.php +++ b/blocks/rss_client/block_rss_client.php @@ -105,7 +105,7 @@ 'id' => $this->courseid, 'section' => 'rss' )); - $output .= '
    '. get_string('feedsaddedit', 'block_rss_client') .'
    '; + $output .= '
    '. get_string('feedsaddedit', 'block_rss_client') .'
    '; } else { // This instance has not been configured yet - show configure link? if (has_capability('block/rss_client:manageanyfeeds', $context)) { @@ -117,7 +117,7 @@ 'id' => $this->courseid, 'section' => 'rss' )); - $output .= '
    '. get_string('feedsconfigurenewinstance', 'block_rss_client') .'
    '; + $output .= '
    '. get_string('feedsconfigurenewinstance', 'block_rss_client') .'
    '; } } //} @@ -132,7 +132,7 @@ foreach ($rssidarray as $rssid) { $output .= clean_text($this->get_rss_by_id($rssid, $display_description, $shownumentries, ($numids > 1) ? true : false), FORMAT_HTML); if ($numids > 1 && $count != $numids -1 && !empty($rssfeedstring)) { - $output .= '
    '; + $output .= '
    '; } $count ++; } diff --git a/blocks/section_links/block_section_links.php b/blocks/section_links/block_section_links.php index cdcdf04e8d7..9ef8e7766ad 100644 --- a/blocks/section_links/block_section_links.php +++ b/blocks/section_links/block_section_links.php @@ -79,7 +79,7 @@ class block_section_links extends block_base { } $style = ($isvisible) ? '' : ' class="dimmed"'; if ($i == $highlight) { - $text .= "
  • $i
  • \n"; + $text .= "
  • $i
  • \n"; } else { $text .= "
  • $i
  • \n"; } diff --git a/theme/standard/styles_fonts.css b/theme/standard/styles_fonts.css index 77706574e48..401ee8a98db 100644 --- a/theme/standard/styles_fonts.css +++ b/theme/standard/styles_fonts.css @@ -308,8 +308,8 @@ a.skip-block { font-size: 0.8em; } -.block_online_users .listentry { - text-align:left; +.block_messages .content .listentry, +.block_online_users .content .listentry { font-size:0.75em } diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index c4459b37bb0..6789ff47cab 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -112,8 +112,7 @@ a img { } img.userpicture, -img.grouppicture, -.block_online_users .listentry img { +img.grouppicture { border: 0 solid } @@ -851,7 +850,7 @@ a.skip-block, .skip-block { .sideblock .content h2 { text-align: left; } -/*.sideblock .content h3, ??*/ + .sideblock .content h2 { margin:1.5em 0 0; padding:0; @@ -880,26 +879,40 @@ a.skip-block, .skip-block { margin:0px; } -.sideblock .content .list { - width: 100%; -} - -.sideblock .content .list li { - clear: both; -} - .sideblock .content .list, .unlist, .inline-list { list-style:none; padding:0; margin:0; } + +.sideblock .content .list { + width: 100%; + margin:0px; + padding:0px; +} + .sideblock .content .inline-list li { display:inline; } +.sideblock .content ul.list li.listentry { + clear:both; +} + +.sideblock .content div.info { + text-align:center; +} + .sideblock .footer { margin-bottom: 4px; text-align:center; + clear:both; +} + +.sideblock img.userpicture { + width:16px; + height:16px; + margin-right:4px; } .blockconfigtable { @@ -910,26 +923,23 @@ a.skip-block, .skip-block { margin-bottom: 0px; } -.block_online_users .listentry { - padding-top:5px; -} - .block_messages .content { text-align:left; font-size:0.75em; padding-top:5px; } -.block_messages .content ul.list { - list-style-type:none; - margin:0px; - padding:0px; +.block_online_users .listentry div.user, +.block_messages .listentry div.user { + float:left; } -.block_messages .content div.nomessage { - text-align:center; +.block_online_users .listentry div.message, +.block_messages .listentry div.message { + float:right; } + /*** *** Blogs ***/