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

Workshop rubrics not rendered correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      Hide

      Testing difficulty: easy

      1. Create a new workshop with the "Rubric" grading strategy.
      2. Edit the assessment form. Define a simple rubric and set the rubric layout to "Grid".
      3. TEST: Click "Save and preview" and make sure the rubric is displayed as expected (see screenshots)

      Show
      Testing difficulty: easy 1. Create a new workshop with the "Rubric" grading strategy. 2. Edit the assessment form. Define a simple rubric and set the rubric layout to "Grid". 3. TEST: Click "Save and preview" and make sure the rubric is displayed as expected (see screenshots)
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-38733-workshop-rubric-css

      Description

      In Moodle 2.5, Moodle form section headers have apparently changed their HTML attribute "id" and it now uses the id_ prefix. I'm not sure but this part of the d23edcf1517dc2c54199287ad3f9f7ecb420f943 commit may be causing it.

      @@ -2555,10 +2569,10 @@ class MoodleQuickForm_Renderer extends HTML_QuickForm_Renderer_Tableless{
           function renderHeader(&$header) {
               global $PAGE;
       
      +        $header->_generateId();
               $name = $header->getName();
       
      -        $id = empty($name) ? '' : ' id="' . $name . '"';
      -        $id = preg_replace(array('/\]/', '/\[/'), array('', '_'), $id);
      +        $id = empty($name) ? '' : ' id="' . $header->getAttribute('id') . '"';
               if (is_null($header->_text)) {
                   $header_html = '';
               } elseif (!empty($name) && isset($this->_templates[$name])) {
         }
      

      This caused a regression in Workshop rubrics. They are implemented in a pretty hacky way and their CSS relies on the header ID attribute.

        Attachments

        1. actual.png
          actual.png
          11 kB
        2. expected.png
          expected.png
          13 kB
        3. problem.png
          problem.png
          18 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/13