highlighting of correct answer is missing in Moodle 1.5

highlighting of correct answer is missing in Moodle 1.5

by Luca Arese -
Number of replies: 27

In the older versions of Moodle,there was tthe higlighting in green of the correct answer, reviewing  a test result :

$THEME->highlight    = "#AAFFAA";  // Highlighted text (eg after a search)

It was a very practical issue, that doesn't work anymore in quizzes on a Moodle 1.5

Any solutions?

Luca

Average of ratings: -
In reply to Luca Arese

Re: highlighting of correct answer is missing in Moodle 1.5

by Gustav W Delius -
That should still work. However in Moodle 1.5 the teacher has more control over when the correct answers are revealed to the student. There is this whole matrix of checkboxes when you set up or update a quiz. You should check whether you have made the choice you want there.
In reply to Gustav W Delius

Re: highlighting of correct answer is missing in Moodle 1.5

by Luca Arese -
I'm sorry Gustav, but it's not working also with all the quiz options checked.
There aren't specific options about highlighting the correct answer.
I'll tryed changing the theme on standard, but the problem i still there.
I'll write again if i'll find the solution to this minor but practical function.
Luca
In reply to Luca Arese

Re: highlighting of correct answer is missing in Moodle 1.5

by Karl Peltomaa -
Luca,
I am having the same problem since I upgraded my installation to 1.5.
The correct answers are not highlighted. I have tried a bunch of different settings on the feedback and review tick boxes. I have tested with making the quiz graded and ungraded. But I still can't get the correct answers to show up highlighted.

What am I doing wrong? Have someone found a fix? Thanks,

Karl

In reply to Gustav W Delius

Re: highlighting of correct answer is missing in Moodle 1.5

by Karl Peltomaa -
Gustav,
Like I wrote in a reply to Luca, I have had the same problem. The correct answer alternatives did not show up being highlighted. I have now managed to make highlighting work, but only in some themes. For instance if I use Standard, FormalWhite, or Standard Red it does not work. But highlighting does work if I select OrangeWhite, StandardLogo, or Metal. I haven't tried the other templates, but perhaps this gives you some clue as to what might be going on.

- Karl
In reply to Karl Peltomaa

Re: highlighting of correct answer is missing in Moodle 1.5

by Gustav W Delius -
That is very weird. Can you file a bug report giving details like the type of browser you are using, the exact version of Moodle you have installed and the type of question you are looking at. The we'll try to get to the bottom of this.
In reply to Gustav W Delius

Re: highlighting of correct answer is missing in Moodle 1.5

by Karl Peltomaa -
Gustav,
I'll do a more complete test later today. Could you tell me how I file a bug report? This will be my first.

- Karl


In reply to Karl Peltomaa

Re: highlighting of correct answer is missing in Moodle 1.5

by Gustav W Delius -
Go to the bug tracker at bugs.moodle.org and create yourself an account. I think it will all be reasonably self-explanatory.
In reply to Gustav W Delius

Re: highlighting of correct answer is missing in Moodle 1.5

by Karl Peltomaa -
Gustav,
It looks like I'll have crow for a late night snack. It seems highlighting is showing after all. At first I used the Formal-white theme, which apparently is not meant to show highlighting, but instead display feedback. My mistake to use it without writing feedback to questions.
Today a few of my students said that they had had problems logging in, and when I looked into that it turned out to be incorrectly set permissions on the "moodledata" directory. I am wondering if that could have caused the problems I had last week with the other themes? Anyway I am sorry for stirring up an issue...pass the salt and pepper, pleasewink

- Karl
In reply to Karl Peltomaa

Re: highlighting of correct answer is missing in Moodle 1.5

by L. Vandijck -
I've been struggling a bit with the same issue, and indeed it is theme related. Adding
.highlight {
  background-color:#AAFFAA;
}
in the body section of the color style sheet cured it.
Regards,
Leo
In reply to L. Vandijck

Re: highlighting of correct answer is missing in Moodle 1.5

by Jason Hando -
Thanks for the tip - I followed instruction to add .highlight style but it didn't work. I added to the fw_color.css file... using formal_white theme. Highlighting of correct or incorrect answers does not occur. Is there another way to fix this please?
In reply to Jason Hando

Re: highlighting of correct answer is missing in Moodle 1.5

by L. Vandijck -
Are you absolutely certain highlighting doesn't work?
Don't forget it only shows after you have completely finished taking the test (done with the button "submit and finish") and if you have allowed the pupils to see the correct answers (this is done when editing the test itself: item "students may view"). So, just submitting the answers is not enough.
In reply to L. Vandijck

Re: highlighting of correct answer is missing in Moodle 1.5

by Jason Hando -
Oops... the highlighting does work when I check the "answers" box next to "student may review". blush

I think I was getting confused cause today my students said they couldn't tell what questions they got wrong during a re-attempt.... and yes, they are right, there is no way to tell. It seems that no matter what I check in quiz edit, all responses are still in place from previous attempt. It only says "correct" and "incorrect" straight after the quiz but not during next attempt - is that normal?

Sorry for the confusion smile

Jason


In reply to Jason Hando

Re: highlighting of correct answer is missing in Moodle 1.5

by L. Vandijck -
I think it all depends on the way you set up the test from the beginning. Don't forget there is a multitude of parameters/settings to choose from:
  • number of attempts allowed
  • each attempts builds on previous one
  • adaptive mode
Combine this with the possibilities you have as to what students may see, which are again divided into several situations:
  • after the attempt
  • while the quiz is still open
  • after it is closed.
All this makes for quite a complicated setup, which requires both a great deal of logical thinking (and deciding) and a bit of tinkering and testing before you can be certain you actually know precisely what is going to happen when your students take a test.
In reply to L. Vandijck

Re: highlighting of correct answer is missing in Moodle 1.5

by Gustav W Delius -
Yes, sorry for the huge number of choices during setup but this arose during discussions on this forum where it became clear that it would not be possible to satisfy everyone's needs without all these options. However the Moodle admin can set a default for all these options on the quiz module setup page so that the options that teachers use most often on that Moodle installation are pre-selected. The admin can go even further and designate the options as "Advanced" so that the teacher will not even see them unless the teacher explicitly requests to see all advanced options. I think this way the admin can make things a lot easier for teachers.
In reply to L. Vandijck

Re: highlighting of correct answer is missing in Moodle 1.5

by Karl Peltomaa -
That little bit of css did it.  Thank you. Now i can use my favorite themesmile

- Karl
In reply to L. Vandijck

Re: highlighting of correct answer is missing in Moodle 1.5

by James Depow -

Hi Leo,

I am using  Moodle 1.5.2 + (2005060222) and a modified Formal_White theme.  I added your code to the end of the fw_color.css file and the correct answers are now hi-lited in green.  Thanks very much!big grin

I added a few lines to the beginning, as I was trying to follow the same protocol as the rest of the file, i.e.,

/***
 *** Modules: Quiz
 ***/

.highlight {
  background-color:#AAFFAA;
}

Thanks again,

Jim


In reply to James Depow

Re: highlighting of correct answer is missing in Moodle 1.5

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

The problem of the non-highlighted correct answer in quizzes arises in the formal_white theme for the following reasons.

  1. in formal_white's config.php we can see the following settings:
    $THEME->standardsheets = array('styles_layout');
    ///$THEME->standardsheets = true; (line commented out)
    which means that formal_white does not include the standard theme's color stylesheet
  2. but the .highlight class is not defined in formal_white's fw_color.css stylesheet
  3. consequently, no color will be displayed for correct answers...

I do not know if this was an oversight or done on purpose by the creator of the formal_white themewink. The problem is that users who will user formal_white either as is, or as the basis of a customized theme will be puzzled at the non-display of highlight in their quizzes, and it will take them a long time to realize the cause.

May I suggest to the creator of the formal_white theme to provide a .highlight class?

Joseph
In reply to Karl Peltomaa

Re: highlighting of correct answer is missing in Moodle 1.5

by Gustav W Delius -
Hi Karl, as you see from all the posts in this discussion, you raised an interesting issue and have thereby helped many others. This is exactly what these forums are for.
In reply to Gustav W Delius

Re: highlighting of correct answer is missing in Moodle 1.5

by Karl Peltomaa -
Yes, I am starting to see just how vibrant the Moodle community are. Not only am I getting hooked on using Moodle for complementing my classroom classes, but also on visiting the community forums. Moodle and moodling rocks. Thanks for your work here with the quiz module, it literally saves me hours every week.
In reply to Gustav W Delius

Re: highlighting of correct answer is missing in Moodle 1.5

by James Robertson -

I had thought correct answer highlighting was working correctly.  For the last  5 weeks I have been giving quizzes with the option selected to show correct answers immediately after submission.  Last week I gave a larger test with the option set to show answers after the quiz closes (last Friday).  Today (Monday) I checked the attempt on a "TestStudent" account and there are no highlights.  I selected the "Later" option also (using an admin login), and still no highlights when viewing on the student account.  When I added "Immediately" to the list, then the student review showed the highlights.  Removing the check from "Immediately" again resulted in no highlights.  Checking "Immediately" only (unchecking the other 2) displayed the highlight.

Is this a bug that has been fixed recently?  I am using 1.5.2+ downloaded on July 21.  I can't see how it could be a CSS problem, since the highlighting shows up fine with "immediately" checked for showing answers.

Thanks,

Jim.

In reply to James Robertson

Re: highlighting of correct answer is missing in Moodle 1.5

by Julian Sedding -
I have looked into the code that determines which of the options are set and which ones aren't. There was a slight mistake in the logic, which should be the cause for the issue with highlighting of correct responses. I have fixed this in CVS (for 1.5 stable and 1.6 dev). It is still possible that there are issues with some of the themes, however, I doubt that that's the case.

Julian

PS: See also the discussion at http://moodle.org/mod/forum/discuss.php?d=26526
In reply to Julian Sedding

Re: highlighting of correct answer is missing in Moodle 1.5

by James Robertson -

Thanks, I had reported it as a bug and I see that it has been closed.  I saw only two files that had changed so I downloaded them to my localhost.  As far as I can tell, the "Later" option works correctly now, but the "After Quiz Closes" still does not work.  I am going to check a little more then post an addendum to the bug report if necessary.

Incidentally, what are the rules for highlighting appearing later?  Does it require exiting the quiz only, logging out, or some amount of time passage, or a combination of these?  I get the highlights showing up later, but so far have not identified the minimal conditions for the highlights to appear under the "Later" option.

Thanks,

Jim.

In reply to Julian Sedding

Re: highlighting of correct answer is missing in Moodle 1.5

by James Robertson -

A few minutes later...

The error is in quiz/localib.php, line 2596  where QUIZ_REVIEW_OPEN needs to be replaced with QUIZ_REVIEW_CLOSED.  Here is my copy with that change, but could someone please check it and post it to CVS?  I have added a similar note to the bug tracker under bug #3884.

Also, it looks like the only criteria for LATER as opposed to IMMEDIATELY is that the quiz is still open and it is more than 2 minutes since completing the quiz.  Any problems with changing it to 5 minutes (300 seconds)?

Thanks,

Jim.

In reply to James Robertson

Re: highlighting of correct answer is missing in Moodle 1.5

by Julian Sedding -
You're exactly right off course! I just made the same copy & paste error that lead to the bug as it was before mixed I just comitted the (hopefully finally) correct version of locallib to CVS.

As I understand it (and I didn't implement the review options, so I may be wrong), the difference between IMMEDIATELY and LATER is that IMMEDIATELY allows reviewing for the 2 minutes you mentioned (review.php, line 52) and LATER allows reviewing IMMEDIATELY and until the quiz closes. So setting this to 5 minutes should not cause any problems, only IMMEDIATELY would be a longer time span. I guess that the allowed 2 minutes are a tolerance interval, which is there to make sure that even via a slow connection students can review their attempt when they are redirected to the review page directly after submitting the quiz.

I hope this bug is done with now smile

Julian
In reply to Julian Sedding

Re: highlighting of correct answer is missing in Moodle 1.5

by Julian Sedding -
I stumbled over this again today and it is as you said; the IMMEDIATELY option is currently active for 2 minutes. If you want to change this, you have to do so at two places:

review.php, line 52
locallib.php, line 2580

Julian
Average of ratings: Useful (1)
In reply to Luca Arese

Re: highlighting of correct answer is missing in Moodle 1.5

by Vicke Denniston -
Picture of Testers
I know its been about a year since this was originally brought up, and I am having this problem. I added the CSS fix mentioned below and it didn't do anything.
I am using 1.52 that was installed through Fantastico, so an upgrade to 1.6 isn't currently practical.
Any suggestions?
In reply to Vicke Denniston

Re: highlighting of correct answer is missing in Moodle 1.5

by Vicke Denniston -
Picture of Testers
I am hoping somebody will read this thread.
I changed the theme at my site, and now I can see the highlighted answers, but they don't appear for the students, and all of the correct options are selected to make this happen. Does anyone have any suggestions???