Quiz Activity Acting Funky, No Question Types

Quiz Activity Acting Funky, No Question Types

per Jim Murray,
Number of replies: 28

Hello everyone!


We are using 3.3.1+ (Build: 20170714), and today for the first time I tried creating a new Quiz activity.  First of all, after setting up the rules of the quiz, I clicked Save and Edit, because I wanted to add new questions in right away.  Nothing happened when I clicked that button, but clicking SAVE and return to course page resulted in TWO of the same quiz activity on the course page.


So I deleted one of the two, and went in to Edit the remaining one.  I clicked on ADD on the right side, and chose New Question.  I then received a message "you must select a question type"....but there was no option for any question types at all.  So I am stuck.....I can't add any questions to my quiz activity.

I tried several different themes, Firefox and Chrome as browsers, but the same thing always happens.


We've never had any problems with our Moodle system over 10 years of use, and upgrade after upgrade.  I realize the Quiz tool in 3.3 has been changed, but how do I get the question types to appear?  They appear as normal in the Plug-in list.....what am I missing?


Please help!  Thanks!

Average of ratings: -
In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

In case there is a question type we have in plugins that is somehow incompatible with 3.3, perhaps I should add that in our plugins we have the following question types:

Calculated....Calculated multichoice...Calculated simple....Description...Drag and drop into text....Drag and drop markers...Drag and drop onto image...Drag-and-Drop Matching...Embedded answers (Cloze)...Essay...Matching...Missing type....Multiple choice...Numerical...Random...Random short-answer matching...Select missing words...Short answer......True/False.

The types that are bolded are the types for which there are existing questions throughout our entire set of courses.

We updated our system from 3.1 to 3.3.1 this past August.  All existing quizzes work fine, and this was the first time I tried out 3.3.1 with creating a brand new quiz.

When I click ADD to add a question to a quiz, if I select the options ADD A NEW QUESTION, I receive a pink bar containing the words "You must select a question type."  And there are no available question types to select.    If I select "from the question bank".....nothing happens.  I remain on the same page.  If I select "add a random question", I go right to the normal screen where you can select a random question from a quiz bank.  That actually works....I can ask that a random question be placed in the new quiz.

Please help!  Please!


In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers

The reason two quizzes got added: Well, the first time when you clicked the button on the 'Add quiz' button, you say "Nothing happened", but actually it did. A quiz got added. (Then, after than an error occurred.) Then you went back to the form and clicked the button again, so a second quiz was added. Thats is explicable.

We need to know what the error is. You need to turn on Debugging.

Also, check Admin -> Plugins -> Question types -> Manage question types.

In reply to Tim Hunt

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Tim - thanks for your quick response!  I'm not sure what I'm looking for when checking the "Manage Question Types" screen, but I listed what is in there in one of my first messages.  From that list, everything is showing enabled except:

Missing type (201751500)




Random (201751500)

There are "uninstall" links next to the following question types:

calculated multichoice

calculated simple

drag and drop markers

If I can supply any other information from that screen, please let me know.  I'll turn on debugging, and go through the quiz process, and then paste the resulting message in my next message.  Thanks again for your patience and help.....without fixing this, our Quiz activity is unuseable.

In reply to Tim Hunt

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Tim - here is what debugging returned:

When I went to the new quiz activity and clicked on EDIT QUIZ:


pix_url is deprecated. Use image_url for images and pix_icon for icons.
line 267 of /lib/outputrenderers.php: call to debugging()
line 952 of /mod/quiz/classes/output/edit_renderer.php: call to renderer_base->pix_url()
line 92 of /mod/quiz/classes/output/edit_renderer.php: call to mod_quiz\output\edit_renderer->question_bank_loading()
line 211 of /mod/quiz/edit.php: call to mod_quiz\output\edit_renderer->edit_page()

No other debugging information was displayed when I tried to add a new question type.

Please let me know if you need any more information.....thanks again for your help!

In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Marcus Green,
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers

I think there is a clue in the error

moodle pix_url is deprecated. Use image_url for images and pix_icon for icons.

This was a change between Moodle 3.2 and 3.3 and it implies either

You have a plugin that is not quite compatible, which would normally be indicated somewhere in those debug messges

or

Your upgrade inadvertabtly left some old files and this is the cause of the problem, which might be in either of these two files

line 92 of /mod/quiz/classes/output/edit_renderer.php: call to mod_quiz\output\edit_renderer->question_bank_loading()
line 211 of /mod/quiz/edit.php: call to mod_quiz\output\edit_renderer->edit_page()

So you could double check to see if they match those in github.

In reply to Marcus Green

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Marcus - thanks for your help in addressing our Quiz activity problem!


I'm not a programmer at all, so could you please explain what you mean by "see if they match those in github?"

How do I do that?  What am I looking for? and finally, how do I fix it?

Thanks for any help you can give me....it is greatly appreciated!


In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Marcus Green,
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers

Sorry, I meant look to see if the files are the same, particularly if one has the pix thing and the other does not

In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Emma Richardson,
Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Plugin developers

Marcus is probably onto something here with the mention of a plugin.  Do you have Sharing Cart installed by chance?  I have found it to break several things in 3.3.  Try disabling plugins one by one and see if that resolves it...

In reply to Emma Richardson

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Emma - thanks for your reply!

We don't have Sharing Cart installed.  We don't have many plugins installed that aren't part of the regular Moodle 3.3.


We do have a Hot Pot Module (2017042707) enabled, and I see a message:

"There is a new version 2017091408 available!"  with links to install it.

We have nanogong installed but disabled.

We have onlineaudio installed but disabled.

If I start to disable plugins, do you have a recommendation of where to start?

In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Hello everyone!

We did do a major install of new themes after we installed 3.3......could this be a theme problem?

I have tested the problem with every theme we installed, and they all result in the same problem:

Adaptable......Boost....Clean....Contemporary.....Essential.....Fordson....Klass.....waxed.


We also have some old themes that are still available:

Leatherbound.....Magazine.....More....Rocket....Serenity....Splashed

I haven't found any mention anywhere of any problems with these themes and the Quiz tool, but might there be?


In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Emma Richardson,
Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Plugin developers

I would maybe try with HotPot but I doubt that is causing it.  What Moodle version did you upgrade from?  Any issues during the upgrade?  I wonder if something went funky with one of the question types during the upgrade and that is causing the issue...you might disable the drag and drop ones for example and just see if you get the pop up box to appear...just going to be trial and error really.  Beyond that, I guess I would suggest trying to upgrade your Moodle again and see if that doesn't fix it..

In reply to Emma Richardson

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Emma - we upgraded from 3.1, I believe.  As far as disabling plugins, is that the eyeball icon that does that?  I don't see a "disable" option anywhere, unless I'm not looking in the right spot.

Thanks again for your help!

In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Emma Richardson,
Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Plugin developers

Yes the eyeball icon.

In reply to Emma Richardson

Re: Quiz Activity Acting Funky, No Question Types

per Gordon Bateson,
Avatar Core developers Avatar Peer reviewers Avatar Plugin developers

Jim,
In the comment for the release of HotPot module version 2017-09-14 (08) is the following comment:

  • replace use of pix_url for compatability with Moodle >= 3.3

So this would probably be the cause of the message you saw.
If you upgrade, you will fix this issue - at least with the HotPot module

Regards,
Gordon

Average of ratings:Useful (1)
In reply to Gordon Bateson

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Gordon - thanks for your reply!

We don't have a lot of teachers using the HotPot style activities, but we will upgrade to that new version and see if that solves our Quiz activity glitch.  Thanks!

In reply to Tim Hunt

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Tim - I also notice now that, in the footer of my theme, I see a "purge all caches" message.


Thanks!


In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Emma Richardson,
Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Plugin developers

Can you show us a screenshot of what happens when you click on the Add Question button from the Edit Quiz screen?  

In reply to Emma Richardson

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Emma - thanks for your reply!  Here's the screenshot.  I have opened up a new quiz, set the parameters, done a SAVE and EDIT, then clicked ADD....."a new question":

screenshot

In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Emma Richardson,
Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Plugin developers

So the question types open in a pop up - I don't suppose you have popups disabled do you?

In reply to Emma Richardson

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Emma - I have replicated this problem in both my Firefox browser and in Chrome.  Neither of them is blocking pop-ups.  For example, in our Moodle 3.3 courses we use pop-ups for things like Pages....and all of them are acting normally.

I still can't seem to get my mind around this problem, so please keep suggesting whatever you think might be the problem.

Thanks!

In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers

When you click Add, A new question, then this pop-up should open:https://docs.moodle.org/33/en/Building_Quiz#Creating_a_new_question

Question type chooser

If that is not happening, check for JavaScript errors in your web browser. (Open the developer tools and choose Console.)

In reply to Tim Hunt

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Tim - thanks for your reply!

When I go to our Moodle site's opening page, and look at the Chrome Developer Tools and Console, I see this message:

http://online.catholicschoolsoffice.org/theme/image.php/waxed/theme/1505862882/favicon Failed to load resource: the server responded with a status of 404 (not found)


When I go to a course page, I get this:


yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:16 GET 500 (Internal Server Error)e.Loader.isCSSLoaded @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:16e.Loader.getModuleInfo @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:14e.Loader.getModule @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:16e.Loader.filterRequires @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:15e.Loader.addModule @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:15e.Loader.getModuleInfo @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:14e.Loader._inspectPage @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:14e.Loader @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:14E @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:8e._setup @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:8YUI @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:8YUI @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:8(anonymous function) @ yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:567

remote.js:8 GET chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js net::ERR_FAILEDMza @ remote.js:8T7 @ remote.js:11(anonymous function) @ remote.js:11c.onerror @ remote.js:7

remote.js:8 GET chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js net::ERR_FAILEDMza @ remote.js:8T7 @ remote.js:11(anonymous function) @ remote.js:11c.onerror @ remote.js:7

remote.js:10 GET chrome-extension://fjhoaacokmgbjemoflkofnenfaiekifl/cast_sender.js net::ERR_FAILED


When I attempt to add a new question to the quiz, I get this message:

yui_combo.php?rollup/3.17.2/yui-moodlesimple-min.js:16 GET 500 (Internal Server Error)


Thanks for any help you can give me!


In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers

That JavaScript error is probably the cause, but that is not really quiz-specific, and I am not sure how to diagnose futher.

Average of ratings:Useful (1)
In reply to Tim Hunt

Re: Quiz Activity Acting Funky, No Question Types

per Marcus Green,
Avatar Core developers Avatar Particularly helpful Moodlers Avatar Plugin developers Avatar Testers

I have been exchanging emails with James and seem to have exhausted my usual diagnostic ideas so hear is a summary of what I know so far in the hope that someone might have some more ideas.

The heart of the problem is that the question selection dialog does not show but existing quizzes work ok (are they editable James?) 

It is a standard Moodle 3.3.1+ install on Ubuntu with PHP 7.0.  They have only core question type plugins.

His system admin person said this 

"the Apache error logs are almost non-existent. If it’s throwing an error, it’s not showing up anywhere that I can see. "

I have certainly seen situations where the question dialog does not show and it is generally solved by purging caches (moodle/admin/purgecaches.php), but he has done that.

On Wednesday he reported the following that seems rather significant and I speculated that there may be some files from the previous version of Moodle still in place. 

James said...

When I went to the new quiz activity and clicked on EDIT QUIZ:

pix_url is deprecated. Use image_url for images and pix_icon for icons.

line 267 of /lib/outputrenderers.php: call to debugging()

line 952 of /mod/quiz/classes/output/edit_renderer.php: call to renderer_base->pix_url()

line 92 of /mod/quiz/classes/output/edit_renderer.php: call to mod_quiz\output\edit_renderer->question_bank_loading()

line 211 of /mod/quiz/edit.php: call to mod_quiz\output\edit_renderer->edit_page()


No other debugging information was displayed when I tried to add a new question type.


I have done some hand/eye comparisons with the code in Github If you focus on the error from line 952

In moodle 3.1 line 952 of that file (which is in function question_bank_loading) contained

array('alt' => 'loading', 'class' => 'loading-icon', 'src' => $this->pix_url('i/loading'))),


Whereas in Moodle 3.3 line 952 appears to be a blank line. However the function

question_bank_loading contains

return html_writer::div($this->pix_icon('i/loading', get_string('loading')), 'questionbankloading');

So at this moment I am thinking there are some "legacy files" from the last version causing problems.

 






In reply to Marcus Green

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Marcus - I see that you have posted here, so in answer to your question....


Yes, quizzes that currently exist can be edited without a problem.  I have gone into a quiz, and added more choices to an existing multiple choice style question, and added more matching pairs to an existing matching question.  I then took those quizzes and everything worked fine.

Right now, we are using the Lesson tool's question capabilities to create new quizzes for existing courses.  Lots less power and possibilities, but at least we can pose multiple choice, matching, true-false type questions when needed.

We are currently at 3.3.1+, and I see that there is now a stable 3.3.2 available.  Might an upgrade to our existing system clean out potential problems with old version files still existing?

Thanks!

Average of ratings:Useful (1)
In reply to Jim Murray

Re: Quiz Activity Acting Funky, No Question Types

per Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers

I just had a thought.

Can you log in as admin, and do Check permissions for the user account you are using to create quizzes. Does that account have permission moodle/question:add, or whatever it is called?

In reply to Tim Hunt

Re: Quiz Activity Acting Funky, No Question Types

per Jim Murray,

Tim - thanks for your reply.  I thought of the permission issue also.  I have gone into the "check permissions" screen for both myself as administrator, and for a person in the teaching role.....and in both instances "moodle/question:add" is set to YES.

Any other ideas are very welcome....we still haven't hit upon the reason for not being able to see the popup "question types" when trying to add a new question to either a new quiz or an existing quiz.

Thanks!

Jim Murray