Moodle
  1. Moodle
  2. MDL-3616

Quiz page #footer div in wrong place

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_15_STABLE
    • Rank:
      14437

      Description

      The #footer section of the main Quiz page is inside the #content div and inside the #middle-column td rather than outside and after the #content div as it is on other pages.

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Gustav Delius (gwd2 at york.ac.uk) Friday, 24 June 2005, 01:50 PM:

        I assume you are talking about view.php? I am assigning this bug to Jon because he is most familiar with this PAGE mechanism. view.php uses $PAGE->print_header() but an ordinary print_footer() to print the footer. Should that be changed to $PAGE->print_footer()?

        From David Scotson (d.scotson at admin.gla.ac.uk) Friday, 24 June 2005, 05:59 PM:

        Yes it's view.php

        Looking at the code it appears that the footer code is called three times (once for teachers, guests and students) but only for the students is the following line called first:

        echo '</td></tr></table>';

        adding this to the other two code paths seems to do the trick.

        From Gustav Delius (gwd2 at york.ac.uk) Friday, 24 June 2005, 06:42 PM:

        Yes, that would do the trick but I am sure that Jon has thought of a more elegant way of doing it. It seems a bit strange to close a table tag that you didn't open, so presumably Jon has provided a print_footer() method that supplies those tags itself.

        From David Scotson (d.scotson at admin.gla.ac.uk) Friday, 24 June 2005, 06:56 PM:

        The table and tr are opened on line 70 of view.php and the td is opened on line 78.

        I assume this code was introduced whenever the (optional) left column for blocks was added and whoever did that missed a couple of code paths. It's not very obvious visually until you start doing weird things with themes that need everything to line up correctly.

        From Jon Papaioannou (pj at moodle.org) Wednesday, 6 July 2005, 08:23 AM:

        Fixed, thanks.

        Unfortunately I had to fix by adding code in the other two paths (three non-converging code paths, grrr, and only one had the print footer comment) because $PAGE doesn't print footers yet. I 've added MDL-3691 to address that. No time right now.

        Show
        Martin Dougiamas added a comment - From Gustav Delius (gwd2 at york.ac.uk) Friday, 24 June 2005, 01:50 PM: I assume you are talking about view.php? I am assigning this bug to Jon because he is most familiar with this PAGE mechanism. view.php uses $PAGE->print_header() but an ordinary print_footer() to print the footer. Should that be changed to $PAGE->print_footer()? From David Scotson (d.scotson at admin.gla.ac.uk) Friday, 24 June 2005, 05:59 PM: Yes it's view.php Looking at the code it appears that the footer code is called three times (once for teachers, guests and students) but only for the students is the following line called first: echo '</td></tr></table>'; adding this to the other two code paths seems to do the trick. From Gustav Delius (gwd2 at york.ac.uk) Friday, 24 June 2005, 06:42 PM: Yes, that would do the trick but I am sure that Jon has thought of a more elegant way of doing it. It seems a bit strange to close a table tag that you didn't open, so presumably Jon has provided a print_footer() method that supplies those tags itself. From David Scotson (d.scotson at admin.gla.ac.uk) Friday, 24 June 2005, 06:56 PM: The table and tr are opened on line 70 of view.php and the td is opened on line 78. I assume this code was introduced whenever the (optional) left column for blocks was added and whoever did that missed a couple of code paths. It's not very obvious visually until you start doing weird things with themes that need everything to line up correctly. From Jon Papaioannou (pj at moodle.org) Wednesday, 6 July 2005, 08:23 AM: Fixed, thanks. Unfortunately I had to fix by adding code in the other two paths (three non-converging code paths, grrr, and only one had the print footer comment) because $PAGE doesn't print footers yet. I 've added MDL-3691 to address that. No time right now.
        Hide
        Michael Blake added a comment -

        Temporary transition to reassign bug to "pj".

        Show
        Michael Blake added a comment - Temporary transition to reassign bug to "pj".
        Hide
        Michael Blake added a comment -

        Re-closing bugs after re-assigning to "pj".

        Show
        Michael Blake added a comment - Re-closing bugs after re-assigning to "pj".

          People

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

            Dates

            • Created:
              Updated:
              Resolved: