Time remaining covers question text

Time remaining covers question text

by Eduardo Hernandez -
Number of replies: 6

Hello,

I have created a Quiz (1.5.3+), using a secure window. However the Time Remaining is covering part of the question text. I have been searching for the forums and no one seems to be facing this problem, so probably it is only me surprise

Is there a way to "move" the clock. I have used the "course program" block where a draggable calendar appears. Probably the same could be used here?.

Eduardo

Attachment moodle_time_remaining_covers.jpg
Average of ratings: -
In reply to Eduardo Hernandez

Re: Time remaining covers question text

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hello Eduardo,

IMPORTANT: we are talking about Moodle 1.5.3 stable. A lot of the formatting is different in version 1.6.

The (absolute) position of the #timer box is defined in file: \moodle\mod\quiz\styles.php. You can either change it there or add the relevant CSS lines to one of your current theme's CSS files (I guess you are using formal_white?).

Current formatting in \moodle\mod\quiz\styles.php is:

#mod-quiz-attempt #timer {
  position:absolute;
  /*top:100px; is set by js*/
  left:10px;
  top:140px!important;
}

In this example, I moved the timer box slightly down by adding the line in blue. By default the top position is set at 100px by javascript, but you can over-ride this setting. See screen shot showing before and after. Of course, you could also move the box horizontally by changing the left:10px value...

Unfortunately, as you may have noticed, when the position of the timer is OK in teacher mode, it is wrong in student mode and vice-versa. And I seen no way to get this right. You'll probably have to decide to choose a position which hides part of the question text in teacher mode and does not hide it in student mode.wink

Hope that helps,

Joseph

Attachment Image1.jpg
In reply to Joseph Rézeau

Re: Time remaining covers question text

by Gloria Doherty -
We are running version 1.6.1 Can you share instructions on how to relocate the countdown clock to the lower left corner of the screen for this version?
In reply to Gloria Doherty

Re: Time remaining covers question text

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Which theme are you using on your Moodle 1.6.1 installation?
Jospeh
In reply to Gloria Doherty

Re: Time remaining covers question text

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
I am using 1.6+ but I suspect the instructions will be very similar if not the same. Here are some changes that I made on my production server to make the time remaining box less intrusive. I am also attaching a diff file that may be more helpful for some. Let me know if you have any questions or trouble.

  1. Customizations to make quiz timer smaller 

    1. /mod/quiz/jstimer.php

 i. line 26 change width from 150 to 50

 ii. line 29 change width from 150 to 50

 iii. line 36 change point size from 14 to 09

 iv. line 51 change value of theTop from 100 to 25

    1. /mod/quiz/styles.php

 i. line 92 change width from 150 to 50

 ii. line 98 change left from 10px to 5px

    1. /mod/quiz/timer.js

 i. line 67 change from pos += 100 to pos += 25

 ii. line 73 change from 1) to 2):

1. temp = setTimeout('movecounter(timerbox)',100);

2. temp = setTimeout('movecounter(timerbox)',25);


In reply to Gloria Doherty

Re: Time remaining covers question text

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Gloria,

Why would you want the timer located in the lower left corner of the screen? One problem with this location is that you can never know where that "lower left corner" would be on your students' screens, as it depends on their computer's screen resolution, the actual height (and width) of their browser window, etc.

Anyway, the simple CSS solution I gave in my previous post still works. You just add the following lines to the end of any one of your current theme's CSS files, e.g. in the Formal White theme, add to the end of fw_layout.css:

#mod-quiz-attempt #timer {
 position: fixed;
 left:10px;
 top:540px!important;
}

For example, on a 1027 x 768 screen resolution the counter would appear a couple of centimeters from the bottom of the window. You'll have to experiment with the top:xxx px size. But again I would not recommend this kind of relocation, too hazardous.

Joseph

In reply to Joseph Rézeau

Re: Time remaining covers question text

by cam nguyen -

Pls help me

not srolls Time Remaining and on top  whith bookbreez theme
moodle1.9.17

 

 

h1.jpg
h1.jpg

still works fine other theme but when set bookbreez theme, This phenomenon occurs

Attachment h1.jpg