Permalink
Browse files

MDL-34992 message : improved component sorting and some minor code cl…

…ean up.
  • Loading branch information...
1 parent 8d7f1b1 commit 3df3c6773b508dcbe834706abfb54a493e9af69b @nebgor nebgor committed Oct 5, 2012
Showing with 6 additions and 5 deletions.
  1. +5 −4 message/renderer.php
  2. +1 −1 theme/standard/style/core.css
View
@@ -227,16 +227,17 @@ public function manage_messagingoptions($processors, $providers, $preferences, $
$output .= html_writer::nonempty_tag('legend', get_string('providers_config', 'message'), array('class' => 'ftoggler'));
foreach($providers as $provider) {
- $components[] = $provider->component;
+ if($provider->component != 'moodle') {
+ $components[] = $provider->component;
+ }
}
// Lets arrange by components so that core settings (moodle) appear as the first table.
$components = array_unique($components);
asort($components);
- array_pop($components); //drop moodle! omg!
array_unshift($components, 'moodle'); // pop it in front! phew!
asort($providers);
- $number_procs = count($processors);
+ $numprocs = count($processors);
// Display the messaging options table(s)
foreach ($components as $component) {
$table = new html_table();
@@ -264,7 +265,7 @@ public function manage_messagingoptions($processors, $providers, $preferences, $
$providername = get_string('messageprovider:'.$provider->name, $provider->component);
$providercell = new html_table_cell($providername);
$providercell->header = true;
- $providercell->colspan = $number_procs;
+ $providercell->colspan = $numprocs;
$providercell->attributes['class'] = 'c0';
$headerrow->cells = array($providercell);
$table->data[] = $headerrow;
@@ -450,7 +450,7 @@ table#tag-management-list {margin: 10px auto;width: 80%;}
.portfolio-add-icon {margin-left:5px;}
/* Messaging options */
-#page-message-edit .mform fieldset div.messagesettingcomponent {float: left; }
+#page-message-edit .mform fieldset div.messagesettingcomponent {float: left;}
#page-message-edit table.generaltable th.c0 {text-align: left;}
#page-message-edit table.generaltable td.c0 {text-align: right;}
#page-message-edit table.generaltable td.disallowed {text-align: center;vertical-align:middle;}

0 comments on commit 3df3c67

Please sign in to comment.