Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-4569

Table tag substitution with div tag in print_simple_box_start and end

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Inactive
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None
    • Environment:
      All

      Description

      I think it's better change table tag with div tags for simple_box functions.

      I propose:

      /**

      • Print the top portion of a standard themed box.

      *

      • @param string $align ?
      • @param string $width ?
      • @param string $color ?
      • @param int $padding ?
      • @param string $class ?
      • @todo Finish documenting this function

      */

      function print_simple_box_start($align='', $width='', $color='', $padding=5, $class='generalbox', $id='') {

      if ($color)

      { $color = bgcolor: $color;; }

      if (($align)&&($width)) {

      $space_left = 100 - (int)$width;

      $space_right = 0;

      if ($align == 'right')

      { $temp = $space_left; $space_left = $space_right; $space_right = $temp; }

      if ($align == 'center')

      { $space_left /= 2; $space_right = $space_left; }

      $space_left = margin-left: . $space_left.%;

      $space_right = margin-right: . $space_right.%;

      }

      if ($width)

      { $width = width: $width;; }

      if ($id)

      { $id = 'id='. $id .''; }

      echo <div $id style=\$width; ;

      if (!empty($space_left)) echo $space_left; $space_right; ;

      echo float: left \ class=\$class\>\n\t<div style=\$color\ class=\$class.content\>;

      }

      /**

      • Print the end portion of a standard themed box.

      */

      function print_simple_box_end()

      { echo \n\t</div>\n</div>; }

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            fairsayan Domenico Pontari
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: