]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-17570,clean align property, merged from 1.9"
authordongsheng <dongsheng>
Wed, 10 Dec 2008 07:24:11 +0000 (07:24 +0000)
committerdongsheng <dongsheng>
Wed, 10 Dec 2008 07:24:11 +0000 (07:24 +0000)
22 files changed:
admin/lang.php
blog/rsslib.php
enrol/authorize/enrol.php
enrol/authorize/enrol_form.php
lib/adodb/adodb-perf.inc.php
mod/feedback/analysis.php
mod/feedback/analysis_course.php
mod/feedback/complete.php
mod/feedback/complete_guest.php
mod/feedback/delete_template.php
mod/feedback/import.php
mod/feedback/print.php
mod/feedback/show_entries.php
mod/feedback/show_entries_anonym.php
mod/feedback/use_templ.php
mod/feedback/view.php
mod/forum/lib.php
mod/resource/type/file/resource.class.php
mod/resource/type/repository/resource.class.php
mod/wiki/ewiki/ewiki.php
question/type/calculated/datasetdefinitions_form.php
theme/standard/styles_layout.css

index a89839326a0e2471c989ee60813713c5b222058c..abb1ed238917c2f5abab45a2a36892a7ecc62ea0 100644 (file)
                 echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
                 echo '<input type="hidden" name="currentfile" value="'.$currentfile.'" />';
                 echo '<input type="hidden" name="mode" value="helpfiles" />';
-                echo "<div align=\"center\">\n";
+                echo "<div class='mdl-align'>\n";
                 echo "<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"filedata\">";
                 if (file_exists("$saveto/$currentfile")) {
                     echo htmlspecialchars(file_get_contents("$saveto/$currentfile"));
             if (is_readable("$altdir/$currentfile")) {
                 // show the content of the same help file in alternative location
                 echo '<fieldset><legend>'.$straltdirtitle.'</legend>';
-                echo "<div align=\"center\">\n";
+                echo "<div class='mdl-align'>\n";
                 echo "<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"\">";
                 if (file_exists("$altdir/$currentfile")) {
                     echo htmlspecialchars(file_get_contents("$altdir/$currentfile"));
                 echo '<fieldset><legend>'.$strlangmasterenglish;
                 helpbutton('langpackages', $strlangmasterenglish);
                 echo '</legend>';
-                echo "<div align=\"center\">\n<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"\">";
+                echo "<div class='mdl-align'>\n<textarea rows=\"$fileeditorrows\" cols=\"$fileeditorcols\" name=\"\">";
                 echo htmlspecialchars(file_get_contents($ensrc));
                 echo "</textarea>\n</div>\n";
                 $preview_url = lang_help_preview_url($currentfile, true, 'en_utf8');   // do not display en_utf8_local
index a0ad2dc09c67edaa632d86dfa4bd10584bde859b..f688f7c1002f657a1cb31da1f714ac22cb49ac0e 100755 (executable)
@@ -40,7 +40,7 @@
 
         require_once($CFG->libdir.'/filelib.php');
         $path = get_file_url($path, null, 'rssfile');
-        print '<div align="right"><a href="'. $path .'"><img src="'. $rsspix .'" title="'. strip_tags($tooltiptext) .'" alt="'.get_string('rss').'" /></a></div>';
+        print '<div class="mdl-right"><a href="'. $path .'"><img src="'. $rsspix .'" title="'. strip_tags($tooltiptext) .'" alt="'.get_string('rss').'" /></a></div>';
 
     }
 
index e50be2eaa3995f4d66b9e7cdddff289abd196e40..30c622d3cb504871b55d670a49223d8ef8119b05 100755 (executable)
@@ -71,7 +71,7 @@ class enrolment_plugin_authorize
 
         if ($USER->username == 'guest') { // only real guest user, not for users with guest role
             $curcost = get_course_cost($course);
-            echo '<div align="center">';
+            echo '<div class="mdl-align">';
             echo '<p>'.get_string('paymentrequired').'</p>';
             echo '<p><b>'.get_string('cost').": $curcost[currency] $curcost[cost]".'</b></p>';
             echo '<p><a href="'.$CFG->httpswwwroot.'/login/">'.get_string('loginsite').'</a></p>';
index 77ec0234dac1432da45396e5c3da882ddffddebc..bf5c0fc4da2783385b582675cce7ccf897da6de0 100755 (executable)
@@ -20,7 +20,7 @@ class enrol_authorize_form extends moodleform
         $mform->addElement('header', 'general', get_string('paymentrequired'));
         $othermethodstr = $this->other_method_available($paymentmethod);
         if ($othermethodstr) {
-            $mform->addElement('static', '', '<div align="right">' . $othermethodstr . '</div>', '');
+            $mform->addElement('static', '', '<div class="mdl-right">' . $othermethodstr . '</div>', '');
         }
 
         $mform->addElement('hidden', 'id', $course->id);
index 50af6e3c5b2f32ab0420df8f8c5790c45fd532ef..5f0e0a487543ce896dcc1f08807384f665066d19 100644 (file)
@@ -751,7 +751,7 @@ Committed_AS:   348732 kB
                        echo $this->Tables(); break;
                }
                global $ADODB_vers;
-               echo "<p><div align=center><font size=1>$ADODB_vers Sponsored by <a href=http://phplens.com/>phpLens</a></font></div>";
+               echo "<p><div class='mdl-align'><font size=1>$ADODB_vers Sponsored by <a href=http://phplens.com/>phpLens</a></font></div>";
        }
        
        /*
@@ -1085,4 +1085,4 @@ Committed_AS:   348732 kB
     // end hack 
 }
 
-?>
\ No newline at end of file
+?>
index 19bcd129d04698ada6bc8746bb7d9fb4fa90cef1..0684f3bc720f7e9eaf067957f2b4ce12968f706d 100644 (file)
         }
 
         //button "export to excel"
-        //echo '<div align="center">';
+        //echo '<div class="mdl-align">';
         // echo '<div class="feedback_centered_button">';
         echo '<div class="form-buttons">';
         $export_button_link = 'analysis_to_excel.php';
             $check_anonymously = false;
         }
     }
-    // echo '<div align="center"><table width="80%" cellpadding="10"><tr><td>';
+    // echo '<div class="mdl-align"><table width="80%" cellpadding="10"><tr><td>';
     echo '<div><table width="80%" cellpadding="10"><tr><td>';
     if($check_anonymously) {
         $itemnr = 0;
index 53fc288440110b5f99b0f57bab59f1d00f5c7f23..ddb31265ee9265c8b28e12623a5a4e12f48c1207 100644 (file)
@@ -70,7 +70,7 @@
 
     if( $capabilities->viewreports ) {
         //button "export to excel"
-        echo '<div align="center">';
+        echo '<div class="mdl-align">';
         $export_button_link = 'analysis_to_excel.php';
         $export_button_options = array('sesskey'=>$USER->sesskey, 'id'=>$id, 'coursefilter'=>$coursefilter);
         $export_button_label = get_string('export_to_excel', 'feedback');
@@ -98,7 +98,7 @@
     }
 
     echo '<form name="report" method="post">';
-    echo '<div align="center"><table width="80%" cellpadding="10">';
+    echo '<div class="mdl-align"><table width="80%" cellpadding="10">';
     if ($courseitemfilter > 0) {
         $avgvalue = 'avg(value)';
         if ($DB->get_dbfamily() == 'postgres') { // TODO: this should be moved to standard sql DML function ;-)
index 2d360fd4add95efaa1cfbb270c16be1b9e585f94..b56d00346705b252135d9475de1b333f57cb24dd 100644 (file)
     
         if( (intval($feedback->publish_stats) == 1) AND ( $capabilities->viewanalysepage) AND !( $capabilities->viewreports) ) {
             if($multiple_count = $DB->count_records('feedback_tracking', array('userid'=>$USER->id, 'feedback'=>$feedback->id))) {
-                echo '<div align="center"><a href="'.htmlspecialchars('analysis.php?id=' . $id . '&courseid='.$courseid).'">';
+                echo '<div class="mdl-align"><a href="'.htmlspecialchars('analysis.php?id=' . $id . '&courseid='.$courseid).'">';
                 echo get_string('completed_feedbacks', 'feedback').'</a>';
                 echo '</div>';
             }
             if(is_array($feedbackitems)){
                 // print_simple_box_start('center', '75%');
                 print_box_start('generalbox boxaligncenter boxwidthwide');
-                echo '<div align="center"><form name="frm" action="'.$ME.'" method="post" onsubmit=" ">';
+                echo '<div class="mdl-align"><form name="frm" action="'.$ME.'" method="post" onsubmit=" ">';
                 echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
                 echo '<table>';
                 switch ($feedback->anonymous) {
index 88bf1bd1540f0194035c8319fce7784c7e8efdf0..5de1f22e17ae4512830bfcd6ef53e21babcc6fed 100644 (file)
         print_heading(format_text($feedback->name));
         
         if( (intval($feedback->publish_stats) == 1) AND ( $capabilities->viewanalysepage) AND !( $capabilities->viewreports) ) {
-            echo '<div align="center"><a href="'.htmlspecialchars('analysis.php?id=' . $id . '&courseid='.$courseid).'">';
+            echo '<div class="mdl-align"><a href="'.htmlspecialchars('analysis.php?id=' . $id . '&courseid='.$courseid).'">';
             echo get_string('completed_feedbacks', 'feedback').'</a>';
             echo '</div>';
         }
             if(is_array($feedbackitems)){
                 // print_simple_box_start('center', '75%');
                 print_box_start('generalbox boxaligncenter boxwidthwide');
-                echo '<div align="center"><form name="frm" action="'.$ME.'" method="post" onsubmit=" ">';
+                echo '<div class="mdl-align"><form name="frm" action="'.$ME.'" method="post" onsubmit=" ">';
                 echo '<table>';
                 echo '<tr><td colspan="3" align="center">
                         <input type="hidden" name="anonymous" value="0" />
index fc86ac627a3fee0c614aa13ead814b64ca5a27b3..8a529664191c45e61eb0cf1a83fbaa5352ffb70d 100644 (file)
@@ -99,7 +99,7 @@
         print_box_end();
     }else {
         $templates = feedback_get_template_list($course, true);
-        echo '<div align="center">';
+        echo '<div class="mdl-align">';
         if(!is_array($templates)) {
             // print_simple_box(get_string('no_templates_available_yet', 'feedback'), "center");
             print_box(get_string('no_templates_available_yet', 'feedback'), 'generalbox boxaligncenter');
index 42c301bd501fef0729a25c969a23adbd7d894a2f..67966cef8a76c286acac87afad6275abf47f75f4 100644 (file)
 
      <?php
 
-    echo '<div align="center">';
+    echo '<div class="mdl-align">';
     print_single_button('edit.php', array('id'=>$id, 'do_show'=>'templates'), get_string('cancel'));
     echo '</div>';
     print_footer($course);
index 3f88fb035ed56ed486f9de2d072e1f2b951ad683..046704443b92131b320415f6b1cb44ec4a0c4c37 100644 (file)
@@ -65,7 +65,7 @@
         
         // print_simple_box_start('center', '80%');
         print_box_start('generalbox boxaligncenter boxwidthwide');
-        echo '<div align="center" class="printview"><table>';
+        echo '<div class="mdl-align printview"><table>';
         //print the inserted items
         $itempos = 0;
         foreach($feedbackitems as $feedbackitem){
index 9b07753be7ddfc1715401265160a5961fa943781..150e18315ad49e0d8bac1e3a9874b0c87d2586f3 100644 (file)
 
             $completedFeedbackCount = feedback_get_completeds_group_count($feedback, $mygroupid);
             if($feedback->course == SITEID){
-                echo '<div align="center"><a href="'.htmlspecialchars('analysis_course.php?id=' . $id . '&courseid='.$courseid).'">';
+                echo '<div class="mdl-align"><a href="'.htmlspecialchars('analysis_course.php?id=' . $id . '&courseid='.$courseid).'">';
                 echo get_string('course') .' '. get_string('analysis', 'feedback') . ' ('.get_string('completed_feedbacks', 'feedback').': '.intval($completedFeedbackCount).')</a>';
                 helpbutton('viewcompleted', '', 'feedback', true, true);
                 echo '</div>';
             }else {
-                echo '<div align="center"><a href="'.htmlspecialchars('analysis.php?id=' . $id . '&courseid='.$courseid).'">';
+                echo '<div class="mdl-align"><a href="'.htmlspecialchars('analysis.php?id=' . $id . '&courseid='.$courseid).'">';
                 echo get_string('analysis', 'feedback') . ' ('.get_string('completed_feedbacks', 'feedback').': '.intval($completedFeedbackCount).')</a>';
                 echo '</div>';
             }
                 $choose_group_form->set_data(array('id'=>$id, 'lstgroupid'=>$SESSION->feedback->lstgroupid, 'do_show'=>$do_show));
                 $choose_group_form->display();
             }
-            echo '<div align="center"><table><tr><td width="400">';
+            echo '<div class="mdl-align"><table><tr><td width="400">';
             if (!$students) {
                 if($courseid != SITEID){
                     notify(get_string('noexistingstudents'));
index f35b5b26fecd0efff72528035f4137b690b4196d..3fc600a93b6ca0b8b16186a3cc51bdbae37967ea 100644 (file)
@@ -93,7 +93,7 @@
         }
     </script>
 
-    <div align="center">
+    <div class="mdl-align">
     <form name="frm" action="<?php echo me();?>" method="post">
         <table>
             <tr>
index 5cf14fee533d5572204b671420feefc4c15e21ff..2bd21e730008b1c8d762a58caa0058fe455d9d5b 100644 (file)
@@ -98,7 +98,7 @@
         echo '<p align="center">'.get_string('preview', 'feedback').'</p>';
         // print_simple_box_start('center', '75%');
         print_box_start('generalbox boxaligncenter boxwidthwide');
-        echo '<div align="center"><table>';
+        echo '<div class="mdl-align"><table>';
         foreach($templateitems as $templateitem){
             echo '<tr>';
             if($templateitem->hasvalue == 1 AND $feedback->autonumbering) {
index 33b9e34dbc98cc88660c7f64eb1a2c0415e81132..af85ce099819274ae24b4dea6ff95a6b7c30dd33 100644 (file)
     
     if( (intval($feedback->publish_stats) == 1) AND ( $capabilities->viewanalysepage) AND !( $capabilities->viewreports) ) {
         if($multiple_count = $DB->count_records('feedback_tracking', array('userid'=>$USER->id, 'feedback'=>$feedback->id))) {
-            echo '<div align="center"><a href="'.htmlspecialchars('analysis.php?id=' . $id . '&courseid='.$courseid).'">';
+            echo '<div class="mdl-align"><a href="'.htmlspecialchars('analysis.php?id=' . $id . '&courseid='.$courseid).'">';
             echo get_string('completed_feedbacks', 'feedback').'</a>';
             echo '</div>';
         }
         if($feedback->course == SITEID) {
             // print_simple_box_start('center', '80%');
             print_box_start('generalbox boxaligncenter boxwidthwide');
-            echo '<div align="center">';
+            echo '<div class="mdl-align">';
             echo '<form action="mapcourse.php" method="get">';
             echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
             echo '<input type="hidden" name="id" value="'.$id.'" />';
index d367114b46717b57c830a281ea67092e83bd76b0..0ab2070bd22abe5849507c84127ff93f2f0b5cbf 100644 (file)
@@ -832,9 +832,9 @@ function forum_cron() {
                         }
                     }
                     if ($canunsubscribe) {
-                        $posthtml .= "\n<div align=\"right\"><font size=\"1\"><a href=\"$CFG->wwwroot/mod/forum/subscribe.php?id=$forum->id\">".get_string("unsubscribe", "forum")."</a></font></div>";
+                        $posthtml .= "\n<div class='mdl-right'><font size=\"1\"><a href=\"$CFG->wwwroot/mod/forum/subscribe.php?id=$forum->id\">".get_string("unsubscribe", "forum")."</a></font></div>";
                     } else {
-                        $posthtml .= "\n<div align=\"right\"><font size=\"1\">".get_string("everyoneissubscribed", "forum")."</font></div>";
+                        $posthtml .= "\n<div class='mdl-right'><font size=\"1\">".get_string("everyoneissubscribed", "forum")."</font></div>";
                     }
                     $posthtml .= '<hr size="1" noshade="noshade" /></p>';
                 }
index 5816aefa7dfd535aa05694fc930b4c03e5e1ae4c..53385c79e9a300f280cf4b5a8fd549f1ac884f43 100644 (file)
@@ -389,7 +389,7 @@ class resource_file extends resource_base {
             $options = new object();
             $options->para = false;
             if (!empty($localpath)) {  // Show some help
-                echo '<div align="right" class="helplink">';
+                echo '<div class="mdl-right helplink">';
                 link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'), get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));
                 echo '</div>';
             }
@@ -462,7 +462,7 @@ class resource_file extends resource_base {
             $options->para = false;
             echo '<div class="summary">'.format_text($resource->summary, FORMAT_HTML, $options).'</div>';
             if (!empty($localpath)) {  // Show some help
-                echo '<div align="right" class="helplink">';
+                echo '<div class="mdl-right helplink">';
                 link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'),
                         get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));
                 echo '</div>';
@@ -688,7 +688,7 @@ class resource_file extends resource_base {
 
         } else {              // Display the resource on it's own
             if (!empty($localpath)) {   // Show a link to help work around browser security
-                echo '<div align="right" class="helplink">';
+                echo '<div class="mdl-right helplink">';
                 link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'),
                         get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));
                 echo '</div>';
index 04ef457540217bbaff2f6785a6136247ec465bc8..8fb2e4f90871db47bc883e2570288e0a313e34e4 100644 (file)
@@ -367,7 +367,7 @@ function display() {
 
         echo '<div class="summary">'.format_text($resource->summary, FORMAT_HTML, $formatoptions).'</div>';
         if (!empty($localpath)) {  // Show some help
-            echo '<div align="right" class="helplink">';
+            echo '<div class="mdl-right helplink">';
             link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'), get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));
             echo '</div>';
         }
@@ -481,7 +481,7 @@ function display() {
 
     } else {              // Display the resource on it's own
         if (!empty($localpath)) {   // Show a link to help work around browser security
-            echo '<div align="right" class="helplink">';
+            echo '<div class="mdl-right helplink">';
             link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'), get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));
             echo '</div>';
             echo "<center><p>(<a href=\"$fullurl\">$fullurl</a>)</p></center>";
index fb377f1e97e0b37e574635c89c5d274e348f3517..2014ef3b1bd4bcfdc9677070832f7dbadf0c3c23 100644 (file)
@@ -1653,7 +1653,7 @@ function ewiki_page_edit_preview(&$data) {
    $preview_text=$GLOBALS["ewiki_plugins"]["render"][0](optional_param("content", null), 1, EWIKI_ALLOW_HTML || (@$data["flags"]&EWIKI_DB_F_HTML));
    return( '<div class="preview">'
            . "<hr noshade>"
-           . "<div align=\"right\">" . ewiki_t("PREVIEW") . "</div><hr noshade><br />\n"
+           . "<div class='mdl-right'>" . ewiki_t("PREVIEW") . "</div><hr noshade><br />\n"
            . format_text($preview_text, $moodle_format)
            . "<br /><br /><hr noshade><br />"
            . "</div>"
@@ -1673,7 +1673,7 @@ function ewiki_control_links($id, &$data, $action) {
    }
 
    $o = "\n"
-      . '<div align="right" class="action-links control-links">'
+      . '<div class="mdl-right action-links control-links">'
       . "\n<br />\n"
       . "<hr noshade>" . "\n";
 
index bd7b6bffceb6db6775fb0d5391f23633a0deed27..806d2561d5d9ed2fc5e238315a00e2280053299a 100644 (file)
@@ -50,7 +50,7 @@ class question_dataset_dependent_definitions_form extends moodleform {
         $datadefscat= array();
         $datadefscat  = $this->qtypeobj->get_dataset_definitions_category($this->question);
         $datasetmenus = array();
-        $label = "<div align=\"center\">".get_string('datasetrole', 'qtype_datasetdependent','numerical')."</div>";
+        $label = "<div class='mdl-align'>".get_string('datasetrole', 'qtype_datasetdependent','numerical')."</div>";
         $mform->addElement('html', $label);// explaining the role of datasets so other strings can be shortened
         $mform->addElement('header', 'mandatoryhdr', get_string('mandatoryhdr', $stringfile));
         $labelsharedwildcard = get_string("sharedwildcard", "qtype_datasetdependent");
@@ -129,4 +129,4 @@ class question_dataset_dependent_definitions_form extends moodleform {
     }
 
 }
-?>
\ No newline at end of file
+?>
index e6b591296e33dc20c190085d1f1eaf4100e2ff47..731e6b7754da337f388a2b7dd2e9a12137f6ed71 100644 (file)
@@ -100,6 +100,12 @@ h6.main {
 .mdl-align {
   text-align: center;
 }
+.mdl-left {
+  text-align: left;
+}
+.mdl-right {
+  text-align: right;
+}
 
 .continuebutton {
   text-align: center;