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

Workshop rubrics not rendered correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.5
    • 2.5
    • Workshop
    • MOODLE_25_STABLE
    • MOODLE_25_STABLE
    • MDL-38733-workshop-rubric-css
    • 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)

      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.

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

            mudrd8mz David Mudrák (@mudrd8mz)
            mudrd8mz David Mudrák (@mudrd8mz)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jason Fowler Jason Fowler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.