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

"Edit $a" tab label not correct in Lesson edit tabs row

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8
    • Component/s: Lesson
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      In Moodle 1.8beta, in Lesson Edit mode, in the top row of tabs, we have the following tab labels: Preview, Edit, Reports and Grade Essays.
      The Edit label comes from lang/moodle.php file, $string['edit'] = 'Edit $a'; called through this line in mod/lesson/tabs.php:
      $row[] = new tabobject('edit', "$CFG->wwwroot/mod/lesson/edit.php?id=$cm->id", get_string('edit'), get_string('editlesson', 'lesson', format_string($lesson->name)));

      However, since there is no $a variable to be sent, the tab prints as "Edit " (that's Edit followed by a space). This looks OK when tabs are used in the CSS file. But in my orangechoc theme I do not use tabs at all but buttons. The presence of the (unncessary) space after the word Edit "pushes" the right border of the button where it is displayed towards the next button to its right (see #2 in attached screenshot).

      In order to print the word Edit on its own in that tab row, to get a correct rendering of buttons if buttons are used (screenshot #3), would it be possible to get the word Edit on its own, not from lang/moodle.php, but from this string, which would be added, e.g. to lang/lesson.php:
      $string['edit'] = 'Edit';
      and called in mod/lesson/tabs.php by this line:
      $row[] = new tabobject('edit', "$CFG->wwwroot/mod/lesson/edit.php?id=$cm->id", get_string('edit', 'lesson'), get_string('editlesson', 'lesson', format_string($lesson->name)));

      Thanks,

      Joseph

        Attachments

          Activity

            People

            Assignee:
            bushido Mark Nielsen
            Reporter:
            rezeau Joseph Rézeau
            Tester:
            Nobody
            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:
              Fix Release Date:
              31/Mar/07