Cannot add questions to quiz from question bank

Cannot add questions to quiz from question bank

by Tzvi Daum -
Number of replies: 7

HI,

I am using 2.8.5+ along with original theme. It worked well for a day or two but suddenly when I want to add a question to a quiz from the question bank, I can no longer do so. The spinner icon just goes round and round and nothing happens. If I go to the question bank directly the questions are there, I just cannot get to categories or their questions from within a quiz. When importing question to the question bank, they also displayed sluggishly.

I don't know if this related, but I was using 2.6 and the question bank would not "shift" to different categories when clicked on that in quiz mode, which is why I upgraded in the first place during the school year. However, now I still cannot add questions to a quiz from the question bank.

Any ideas would be greatly appreciated.

Thank you.

Average of ratings: -
In reply to Tzvi Daum

Re: Cannot add questions to quiz from question bank

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

At which point in the process of adding a question from the question bank do you see the error?

Which web browser are you using, and are there any JavaScript errors reported by the browser?

Can you turn on Debugging in Moodle, and see if that leads to any error messages being displayed?

In reply to Tim Hunt

Re: Cannot add questions to quiz from question bank

by Tzvi Daum -

Thanks Tim. The error occurs simply when I click on "add question from question bank" to the quiz. There are no debugging errors. There is a Javascript error which is displayed below. I did find a workaround in that I can add a "random question" from the same category and then I can go back and add questions normally. Weird. I tried this in multiple browsers and computers.


Tzvi


moodle-core-dock-loader: Dock loader initialising

yui_combo.php:5828 moodle-core-dock-loader: Dock loader watching block with instance id: 5

yui_combo.php:5828 moodle-core-dock-loader: Dock loader watching block with instance id: 4

yui_combo.php:5828 moodle-core-dock-loader: Loading dock module

yui_combo.php:5828 moodle-core-dock: Initialised block with instance id:5

yui_combo.php:5828 moodle-core-dock: Initialised block with instance id:4

yui_combo.php:5828 moodle-core-dock: Dock initialising

yui_combo.php:5828 moodle-core-dock: Moving block to the dock:4

yui_combo.php:5828 moodle-core-dock: Initialised dockeditem for block with title "Navigation (4)

yui_combo.php:5828 moodle-core-dock: Adding block Navigation (4) to the dock.

yui_combo.php:5828 moodle-core-dock: Enabling the dock tab sizer.

2yui_combo.php:5828 moodle-block_navigation: Initialising navigation block tree

yui_combo.php:5828 moodle-core-actionmenu: Initialising the action menu manager

yui_combo.php:5828 moodle-mod_quiz-quizquestionbank: Starting load.

yui_combo.php:5828 moodle-mod_quiz-quizquestionbank: Load request sent.

yui_combo.php:5828 warn: The moodle-core-notification parent module has been deprecated. Please use one of its subclasses instead.

yui_combo.php:5828 moodle-core_blocks: Block drag and drop initialised for the blocks method.

yui_combo.php:5828 Initialising drag and drop for blocks.

yui_combo.php:5828 Block region `side-pre` initialising

yui_combo.php:5828 Block region `side-post` initialising

yui_combo.php:5828 Initialisation of drag and drop for blocks complete.

yui_combo.php:5828 moodle-core-actionmenu: Displaying an action menu

yui_combo.php:5828 moodle-core-actionmenu: Hiding an action menu

yui_combo.php:5828 moodle-core-lockscroll: Enabling LockScroll.

yui_combo.php:5828 moodle-core-lockscroll: Setting the activeScrollLocks count from 0 to 1

http://torahskills.org/main/mod/quiz/questionbank.ajax.php?cmid=2883 Failed to load resource: the server responded with a status of 500 (Internal Server Error)

yui_combo.php:5828 moodle-mod_quiz-quizquestionbank: Load failed.

In reply to Tzvi Daum

Re: Cannot add questions to quiz from question bank

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That 500 internal server error will be accompanied by a debugging error, but you can't see it because it is an ajax request. You need to get Moodle writing the debugging errors to the server log, as well as on-screen (actually, that should happen anyway) then find the error from the logs.

In reply to Tim Hunt

Re: Cannot add questions to quiz from question bank

by Tzvi Daum -

Does this look like what I might be looking for?


[27-Apr-2015 22:46:40 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

In reply to Tzvi Daum

Re: Cannot add questions to quiz from question bank

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Probably not. That seems to have nothing to do with the quiz. It does seem to relate to PHP staring, and being unable to load a certain MySQL library, which would affect every request.

However, it does seem like you have found the right file, probably.

Set Debugging to DEVELOPER but leave Display debug messages off.

Open the PHP error log and see what the last message is.

Then, do what you were doing in the quiz that did not work.

Then look at the error log again to see what has been added at the end.

In reply to Tim Hunt

Re: Cannot add questions to quiz from question bank

by Tzvi Daum -

Hi Tim,

I still didn't get to the PHP logs but I did look at the general server errors and noticed this one:

Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for...../theme/yui_combo.php (I took out some of the path).

I contacted the host and they said: 


It looks like your server was running out of memory. I'm seeing that your MySQL configuration was set up for a server with more memory. I have adjusted the settings to more appropriate levels.


Since then it look like things are working properly.


TD


In reply to Tzvi Daum

Re: Cannot add questions to quiz from question bank

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Good detective work! Let's hope that has solved the problem.