Merge branch 'MDL-41050-master' of git://github.com/sammarshallou/moodle
authorSam Hemelryk <sam@moodle.com>
Mon, 12 Aug 2013 21:27:50 +0000 (09:27 +1200)
committerSam Hemelryk <sam@moodle.com>
Mon, 12 Aug 2013 21:27:50 +0000 (09:27 +1200)
1  2 
lib/weblib.php

diff --cc lib/weblib.php
@@@ -2993,13 -2942,14 +2993,14 @@@ class progress_bar 
      public function create() {
          $this->time_start = microtime(true);
          if (CLI_SCRIPT) {
 -            return; // temporary solution for cli scripts
 +            return; // Temporary solution for cli scripts.
          }
+         $widthplusborder = $this->width + 2;
          $htmlcode = <<<EOT
-         <div style="text-align:center;width:{$this->width}px;clear:both;padding:0;margin:0 auto;">
+         <div style="text-align:center;width:{$widthplusborder}px;clear:both;padding:0;margin:0 auto;">
              <h2 id="status_{$this->html_id}" style="text-align: center;margin:0 auto"></h2>
              <p id="time_{$this->html_id}"></p>
-             <div id="bar_{$this->html_id}" style="border-style:solid;border-width:1px;width:500px;height:50px;">
+             <div id="bar_{$this->html_id}" style="border-style:solid;border-width:1px;width:{$this->width}px;height:50px;">
                  <div id="progress_{$this->html_id}"
                  style="text-align:center;background:#FFCC66;width:4px;border:1px
                  solid gray;height:38px; padding-top:10px;">&nbsp;<span id="pt_{$this->html_id}"></span>