Moodle
  1. Moodle
  2. MDL-26948

Add an ID to the Quiz Navigation block so that it can be more easily manipulated via css

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2, 2.1
    • Fix Version/s: 2.0.4
    • Component/s: Quiz
    • Labels:
    • Environment:
      All I presume. I'm running Moodle 2.0.2+ (Build: 20110316) on Windows Server 2003, IIS 6 and MSSQL 2005.
    • Database:
      Microsoft SQL
    • Testing Instructions:
      Hide

      Go to both the quiz attempt and review pages. Use firebug, or similar, to inspect the quiz navigation 'fake block'. Verify it has an id="mod_quiz_navblock" attribute.

      Show
      Go to both the quiz attempt and review pages. Use firebug, or similar, to inspect the quiz navigation 'fake block'. Verify it has an id="mod_quiz_navblock" attribute.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      I have created a quiz with all the questions displayed on one page and I want the Quiz Navigation block to scroll down as the students scroll the quiz window during a quiz attempt. This way the countdown timer in the Quiz Navigation block is always visible to the student making it easier to keep track of time. But apparently the Quiz Navigation block doesn't have a ID so targeting this block with .css is difficult. Can this ID be added?

      A Using Moodle discussion about this issue: http://moodle.org/mod/forum/discuss.php?d=171630

      The solution that John proposes in that thread works quite nicely, but it also makes the quiz Settings block on the Quiz Preview screen (/mod/quiz/attempt.php?attempt=12345) scroll, which we don't want.

      Will adding a classes or ID as John suggested in that forum discussion solve this problem?

        Gliffy Diagrams

          Activity

          Hide
          Tim Hunt added a comment -

          I thought that all blocks (and fake blocks) on a page automatically got given an ID. For example, have a look at the PHPdoc comment on the $skipid field in block_contents in lib/outputcomponents.php. Sadly, that comment seem to be a lie.

          Show
          Tim Hunt added a comment - I thought that all blocks (and fake blocks) on a page automatically got given an ID. For example, have a look at the PHPdoc comment on the $skipid field in block_contents in lib/outputcomponents.php. Sadly, that comment seem to be a lie.
          Hide
          Tim Hunt added a comment -

          Fixed. I used mod_quiz_navblock on the grounds that that would probably not clash with anything else.

          Show
          Tim Hunt added a comment - Fixed. I used mod_quiz_navblock on the grounds that that would probably not clash with anything else.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          Sam Hemelryk added a comment -

          Thanks Tim - tested and passed.

          Show
          Sam Hemelryk added a comment - Thanks Tim - tested and passed.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          All git & cvs servers have been updated with these cool changes, so closing, many thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - All git & cvs servers have been updated with these cool changes, so closing, many thanks!

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: