Joseph Rézeau
Posts made by Joseph Rézeau

Thanks for the speedy replay, Tim. Unfortunately I confirm that importing questions containing answers with non-standard grades throws an error and those questions are not imported. Here are the messages (for an XML file containing 1 such question)
Parsing questions from import file.
Importing 1 questions from file
Grades (-2.5) do not match grade options - question skipped.
... and there is no question imported in the database, of course...
In the post you posted back in 2012, you mention turning off 'error if grade not listed' but in the current version of Moodle the user is not given such a choice, only the 2 choices I mentioned in my original post above. We are really missing a 3rd choice, i.e. "accept non-standard grades". Of course for such non-standard grades to be actually used in questions one needs to develop custom question types. But I've already done that. I'm only missing that restriction to be removed (optionally, of course).
Hope this is clear.
In the meantime we are using a temporary workaround, i.e. in file moodle\question\engine\bank.php line 344 etc. we add: $rawfractions = array(
2.5000000,
0.9000000,
0.8333333,
etc.
Another possibility would be to override function importprocess() in moodle/question/format.php but a) you say "This method should not normally be overidden" and b) I don't know where in my custom question type I should over-ride it.
Using Moodle 3.9.2 (Build: 20200914)
I'm currently helping a colleague import questions from an official exam where wrong answers are graded -250% (minus 250%). OK, I know that is a rather harsh/weird/call it what you like penalty, but I have to accept it. So I created a custom multichoice_custom question type based on the standard Moodle MULTICHOICE question type. This is working fine, creating a question features the -250% grade, including questions in a quiz works OK, backups and restoration of such quizzes work OK, exporting those questions is OK, etc.
The only problem I have is importing those questions, because the Import "match grades" is too strict or missing a 3rd option. What I would like to see in the Match grades dropdown list is:
Error if grade not listed
Nearest grade if not listed
Continue and import question if grade not listed
I do appreciate that the case I have to deal with is rather "borderline", but it's a real life case.
I've only found 2 posts on this forum related to this problem:
https://moodle.org/mod/forum/discuss.php?d=372098#p1500167
https://moodle.org/mod/forum/discuss.php?d=201294#p878164
In that second post Tim says "The import has an option 'error if grade not listed' or something like that. If you turn that off, then the file should import OK." Unfortunately that is not true, you can't import questions which have non-standard grades for answers...
Moodle en français -> Discussions techniques -> H5P -> Re: H5P
Bonjour,
D'abord quelques précisions :
Version de Moodle ?
Vous utilisez l'activité H5P intégrée à Moodle ou le plugin externe H5P ? Icône sur fond bleu ou sur fond noir ?

Pour autoriser l'accès de Moodle Mobile aux activités H5P, voir la documentation ici : https://docs.moodle.org/3x/fr/H5P#Installation et en particulier le paragraphe:
Les activités H5P sont supportées sur l'app mobile à 2 conditions : etc.