Sharing score for a question

Sharing score for a question

от JF Dragon -
Number of replies: 9

I'm in Moodle 2.2.1 and I would like to hide the score of a question within the question box (for Cloze question). I don't whant the student to know how many points are relate to each question.

In normal view, the only thing I can get when I use the quiz, is like the image below:

img1

But when I'm in "Test administration > Question bank > Question" and I preview the question, I can change the options on the bottom to "Not show" the "Marks". When I do so, I view the following information in the question information box:

img2

Is it possible to get the same behaviour when I view the quiz in normal view?

Hope it's only a little setting I miss.

JF

In reply to JF Dragon

Re: Sharing score for a question

от Tim Hunt -
Снимка на Core developers Снимка на Documentation writers Снимка на Particularly helpful Moodlers Снимка на Peer reviewers Снимка на Plugin developers

What is going on is that behind the scenes, the 'display marks' option has three settings, none, max only, or the student's mark and the max.

The problem is that the corresponding setting in the quiz only has two options, on and off. So (in order to be backwards compatible) we map off to max only, and on to mark and max.

The only way to change this is to edit the code. The key line is

        $options->marks = self::extract($quiz->reviewmarks, $when,
                self::MARK_AND_MAX, self::MAX_ONLY);

in the make_from_quiz method around line 1350 of mod/quiz/locallib.php. Change MAX_ONLY to HIDDEN.

In reply to JF Dragon

Re: Sharing score for a question

от Itamar Tzadok -

You should also be able to hide it by css if you don't want to tamper with the code. To illustrate, I highlighted the marks info to make it easier to see in the review if the response was correct (due to the particular review settings of the quizzes).

I added to the theme's css

#page-mod-quiz-review .que .info div.grade {
    background-color#FFFFFF;
}
 
to the effect
 
 
If you set display:none the mark info won't be displayed.
 
You can also apply the css to particular question types by adding the question type class name: 
 
#page-mod-quiz-review .multichoice .info div.grade {
    display: none;
}

and use #page-mod-quiz-attempt to apply in the attempt.

усмивка

 

In reply to Itamar Tzadok

Re: Sharing score for a question

от JF Dragon -

Thank you Itamar,

Your idea seem interesting to, but I would like to be able to keep the possibility to show the mark in the majority of the quizzes. As I understand your proposition, changing the CSS will change all questions or question types behaviour in all my quiz.

But is there a way to do like in the Database module and change the CSS with applying some change within the question edit box (like with cloze question). If so, it could be the simpler way for me...

In reply to JF Dragon

Re: Sharing score for a question

от Itamar Tzadok -

You can add css in description questions to affect elements locally on a quiz page (you can refer to particular questions by their id). усмивка

In reply to JF Dragon

Re: Sharing score for a question

от Joseph Rézeau -
Снимка на Core developers Снимка на Particularly helpful Moodlers Снимка на Plugin developers Снимка на Testers Снимка на Translators

@JF, you have a Cloze question that is actually marked out of 8478 points?внимателен

In reply to Joseph Rézeau

Re: Sharing score for a question

от JF Dragon -

Eagle eye Joseph! голяма усмивка

In fact, some of my questions within a Cloze question (yes, I put up to 15 questions within a single Cloze question) give 0.5555556 points and some other give 10 points. So I score them respectively 56 points for the first kind and 1000 points for the other one. That's why I get a 8478 points for a single question... and that's why I want to hide the mark. Easyer then explaining the grading logic to the student... but I also have a way to share them what question get more points. Anyway, at the end, all the quiz is mark to 100 points in the «Edit quiz» page.

I know, it's treacky, but you don't see the best... I also put negative score for some questions... some of them are pass or fail type.

In fact, it's not a quiz for students. It's a quiz use by a teacher to evaluate a student realizing his job in context. An other treacky thing изплезване