Community Forums

ATutor Support

An issue inserting multichoice questions into the question bank


You must be signed-in to post.

AuthorSubject
 
Page: 1
jimbarnes
Subject: An issue inserting multichoice questions into the question bankQuote this post in your reply
Operating system ATutor is installed on - Linux
ATutor version - 2.2
Patch #s applied - none
ATutor theme name - Atutor Classic
PHP version - 5.3
MySQL version - 5.5
Webserver & version - Apache latest
Copies of error messages -
Changes to default settings - none
Web browser being used - Firefox 36

Hi Greg

I have a weird problem thats related to creating questions in the question bank.

Remember I couldnt see more than three questions. Well I manually edited the database using phpMyadmin and successfully created the next question. Then I could see four questions. ATutor then let me create more questions so long as they were type 2 true/false, but as soon as I tried to create a multiple choice it would give me an error saying it could not access the database. So I created the multichoice questions using phpMyadmin and then tried to modify the questions in ATutor. It does this with no problem so obviously it can access the database to update just not insert and only for multiple choice questions.

I did notice that when I use phpMyadmin to insert a record into the test_questions table it creates two rows with the second one marked to ignore.

I dont know if this is to assist in record creation in phpMyAdmin.

Also the table is set to dynamic not fixed.

So have you had any experiences like this as some advice would be appreciated.

Best Regards

Jim Barnes
Posted: 2015-02-01 14:57:47
jimbarnes
Subject: Re: An issue inserting multichoice questions into the question bankQuote this post in your reply
I meant to add this error message

ATutor was unable to access the database. If the problem persists, please report this to an Administrator with this date reference

and that all patches have been applied

cheers

jim barnes
Posted: 2015-02-01 15:21:30
jimbarnes
Subject: Re: An issue inserting multichoice questions into the question bankQuote this post in your reply
And just to clarify: ATutor will let me enter a T/F question and then a Multichoice straight after but then it wont let me add either a T/F or Multichoice and gives me the error.

Until I go and enter a question using phpMyAdmin and then I can add as many T/F questions as I like until I follow them with a multichoice which it will let me enter.

But after that I get errors. If I enter with phpMyAdmin and then try a multichoice in ATutor it gives me the error

Weierd Huh?

cheers
Posted: 2015-02-01 15:30:03
greg

Avatar for greg
Subject: Re: An issue inserting multichoice questions into the question bankQuote this post in your reply
Unfortunately I can't reproduce this problem. I followed your steps, and had no trouble continuing to create t/f or m/c questions.

Again I would say this is browser related. Restart your browser, try a different browser, perhaps on a different system.

Try yourself on our demo site.
Posted: 2015-02-02 10:20:39
jimbarnes
Subject: Re: An issue inserting multichoice questions into the question bankQuote this post in your reply
Hi Greg

I tried with IE 11 and Opera and Chrome

but still got the same errors

is their a debug function in the software?

I checked with the host and they wont give me the connection logs for the DB so I am kinda stuck.

cheers

Jim Barnes
Posted: 2015-02-02 20:20:39
greg

Avatar for greg
Subject: Re: An issue inserting multichoice questions into the question bankQuote this post in your reply
Set AT_DEVEL to "1" at the top of include/vitals.inc.php to enable debugging. After which use debug() to output values.

help.atutor.ca/developer/guidelines.html#fn-debug
Posted: 2015-02-02 20:28:18
jimbarnes
Subject: Re: An issue inserting multichoice questions into the question bankQuote this post in your reply
Hello Greg

I did some more work on why the system wouldn't let me save multiple choice questions. It just so happens that in the T/F questions we weren't using punctuation!

I discovered that when punctuation is used in the optional feedback or remedial content when creating a question the database doesn't like it and gives the unable to connect to server message.

I have tested this on the demo server and it is the same.

Try putting this string into those areas when creating then saving a question and you will see what i mean.

><.,:";'?/}{][)(*&^%$#@!

I don't know specifically which character it is that creates the problem.

But I do remember there was some issue with mysql and magic quotes that was used and has since been deprecated in favour of regex.

Anyway let me know.

Thanks

Jim Barnes
Posted: 2015-02-18 20:41:22
greg

Avatar for greg
Subject: Re: An issue inserting multichoice questions into the question bankQuote this post in your reply
I was able to reprodcue this on the demo site, though not on a local MAMP install.


atutor.ca/atutor/mantis/view.php?id=5567

Will try to take a look at this soon.
Posted: 2015-02-19 09:19:48
greg

Avatar for greg
Subject: Re: An issue inserting multichoice questions into the question bankQuote this post in your reply
The problem is the percent sign (%)
Posted: 2015-02-19 10:04:05
jimbarnes
Subject: Re: An issue inserting multichoice questions into the question bankQuote this post in your reply
Hello Greg

I did some more testing (in the demo system)and its not just the percent sign. Its also the single quote or apostrophe as is used in tomato's that causes the problem.

At least, when trying to add multiple choice questions and having either of those characters in the remedial and feedback areas. The system gives you the cannot connect to database error message.

When you use them in T/F questions it gives no error message and just takes you back to the create question screen.

Cheers

Jim Barnes
Posted: 2015-02-20 06:59:02
greg

Avatar for greg
Subject: Re: An issue inserting multichoice questions into the question bankQuote this post in your reply
We'll get this into the queue to be fixed in the next little while.
Posted: 2015-02-20 09:23:19
 
Page: 1

You must be signed-in to post.

Related Articles