Cannot get Test Results to save

Please always state the Chamilo version you are referring to when reporting issues or asking questions.

Moderator: Coursenligne

Cannot get Test Results to save

Postby RayGauthier » 19 Jul 2017, 20:00

I can't get Test results to save. I'm in way over my head and could surely use some help.

I have a new install of Chamilo 1.11.4 on a Linux server with PHP 7.1.7 and MySQL 14.14 dist 5.6.35

I can create users, courses and tests BUT, no one (user or admin) can save the results of test questions. Have tried with multiple choice, multiple answers and unique answer with unknown with the same result. When the user clicks the "save and continue later" button after the question, the spinning-wheel icon appears and never disappears. When the user clicks the "end test" button, a red circle icon with a white line through it appears.

Error logs in /main/inc/ajax/error_log show the following:
[19-Jul-2017 19:39:35 UTC] An exception occurred while executing 'SELECT *
FROM search_engine_ref
WHERE course_code='BIA'
AND tool_id='learnpath'
AND ref_id_high_level=
AND ref_id_second_level=0
LIMIT 1':

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND ref_id_second_level=0
LIMIT 1' at line 6

I also get an error that the The Xapian search module is not installed when I am creating the test questions. Tried installing xapian with the instructions here https://xapian.org/docs/install.html but I think that is a separate issue.

I've attached an image of my setup files from Admin - System Status and there are a couple of modules that seem to need fixing but again, they don't seem (to this novice's eyes) as relevant.

If anyone has experienced this or could point me in the right direction, I'd appreciate it.

Thanks,
Ray
Attachments
chamilo-setup.jpg
Setup Files screen shots.
chamilo-setup.jpg (716.96 KiB) Viewed 2805 times
RayGauthier
Newbie
 
Posts: 3
Joined: 24 Jun 2017, 11:35

Re: Cannot get Test Results to save

Postby RayGauthier » 31 Jul 2017, 19:16

Any ideas folks? A specific file/folder I can check permissions or ownership for.

Love Chamilo -- I just can't use it if I people can't take tests...

Many thanks!
RayGauthier
Newbie
 
Posts: 3
Joined: 24 Jun 2017, 11:35

Re: Cannot get Test Results to save

Postby richard47 » 09 Aug 2017, 19:32

Ray,

I am quite savy with other software but new to Chamilo, so I may be completely mistaken here, but as nobody else has answered, so here's my suggestion.

If the wheel spins continually and never disappears, it is probably because it has been tasked with doing something that it either can't start, or can start but not complete. The last coded instruction will have been for it to do something. It can't do what it has been instructed to do, and it won't do anything else until it has done it. So it continues to endlessly spin.

The error message appears to be telling you that the file 'Select' has been formatted wrongly (or corrupted) around line 6 where it says 'AND ref_id_second_level=0 LIMIT 1'.

A search for the words 'ref_id_second' in my Chamilo files found those words in the db_main.sql and in the main.sql files, both of which were in the following folder: vendor/chamilo/chash/src/chash/resources/database/

If you can identify the file, I suggest backing it up, before you change it. If it then works, all is well. If it doesn't, reinstall the file you backed up, and you are back to square one.

The syntax for SQL 5.6 can be found at https: //dev.mysql.com/doc/refman/5.6/en/sql-syntax. html but probably the easiest way would be to get a backup copy of the file (if you have one that previously worked) and replace the corrupted file with it.

A little knowledge is dangerous (I speak from experience of having a little knowledge of lots of things, and usually causing chaos), so I may be completely on the wrong track. I did say I was new to Chamilo.

Hope some of the above info may at least point you in the right direction in the absence of anyone else answering.

Good Luck

Richard
richard47
Newbie
 
Posts: 3
Joined: 09 Aug 2017, 14:30

Re: Cannot get Test Results to save

Postby RayGauthier » 11 Aug 2017, 01:05

Thanks for taking the time Richard. I'll give that a shot on the weekend.
RayGauthier
Newbie
 
Posts: 3
Joined: 24 Jun 2017, 11:35

Re: Cannot get Test Results to save

Postby richard47 » 11 Aug 2017, 08:45

Ray,

Before you try my previous suggestion, there may be a much simpler explanation and a much simpler solution.

Screenshots didn't show up for me properly because the forum is not responsive, so only just realised I had only seen the first bit of the screenshot. Looking further, I realised that your PHP settings are probably preventing the form from running, because the script isn't being allowed to run long enough for it to complete its task.

In particular:
1) max_input_time is set to '60' but should be at a minimum of '300'.
2) max_execution_time is set to '30' but should be at a minimum of '300'

Changing those two PHP settings should cure your problem.

You should have a php.ini file at the root of your site, so to add those settings you just type the following two lines onto the bottom of that file:

max_execution_time = 300
max_input_time = 600

If you haven't got, or haven't got access to a php.ini file, just create one at the root of your site and add those lines in it.

Here is a copy of my full php.ini file (I am also, like you, using PHP 7)

allow_url_fopen = Off
allow_url_include = Off
asp_tags = Off
display_errors = Off
enable_dl = Off
file_uploads = On
max_execution_time = 300
max_input_time = 600
max_input_vars = 3000
memory_limit = 1024M
session.gc_maxlifetime = 4320
session.save_path = "/var/cpanel/php/sessions/ea-php56"
upload_max_filesize = 100M
short_open_tag = Off
safe-mode = Off
magic_quotes_gpc = Off
magic_quotes_runtime = Off
post_max_size = 100M
variables_order = GPCS
date.timezone = "Europe/London"

Hope this helps.

Richard
richard47
Newbie
 
Posts: 3
Joined: 09 Aug 2017, 14:30

Re: Cannot get Test Results to save

Postby ademendieta » 10 Mar 2018, 22:36

Hello Ray. Did you solve this issue? I'm having a very similar issue and I tried almost everything I found on the forums but nothing. And, as you said, I like Chamilo but I cannot use it if users cannot do tests.

This is my case. I hope someone can help me. Im start to feel very frustrated.

First of all, I appreciate the support that you can give me with this problem that I have not been able to solve for some time, although I have changed my hosting and the problem persists.

I have 2 installations of Chamilo just with the basic configuration and there is an issue I cant find any solution. I also asked my hosting provider who runs several Chamilo installations and they report that they never had this issue with their other customers.

I can create without issues exercises with any kind of questions, but at the moment an user try to pass to the second question, it just keep thingking without going forward. As showed in the attached image. [enter image description here][1]

My hosting provider answered me the following:

We have been reviewing the error that indicates, however we can not give a solution, it is an error in the programming of chamilo that sends wrong queries to the database and it returns an erroneous response, indicating that the syntax is not correct.

We have modified more than 5 files of chamilo trying to correct the syntax, but it is useless, we have also tried to change from MariaDB 10 to MySQL 5.5 (version recommended by chamilo) to see if this corrected the problem, but nothing, and we have even changed the operation of php to work with FastCGI instead of FPM has also not worked.

The only thing we can say is that you must report it to Chamilo so they can give you a solution, since what we see in the forums it is an existing bug, but so far none of the solutions we have found has provided a resolution to his case.

Below are the errors that Chamilo has given to us so that you can report it.

PHP-FPM MySQL 5.5

AH01071: Got error 'PHP message: An exception occurred while executing' SELECT * \ n FROM search_engine_ref \ n WHERE course_code = 'PTA1' \ n AND tool_id = 'learnpath' \ n AND ref_id_high_level = \ n AND ref_id_second_level = 0 \ n LIMIT 1 ': \ n \ nSQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND ref_id_second_level = 0 \ n LIMIT 1' at line 6 \ n ', referer: https://e-campus.actualizate.online/main/ exercise / exercise_submit.php? cidReq = PTA1 & id_session = 0 & gidReq = 0 & gradebook = 0 & origin = learnpath & exerciseId = 2 & origin = learnpath & learnpath_id = 1 & learnpath_item_id = 11 & learnpath_item_view_id = 0

PHP-FPM MariaDB 10

AH01071: Got error 'PHP message: An exception occurred while executing' SELECT * \ n FROM search_engine_ref \ n WHERE course_code = 'PTA1' \ n AND tool_id = 'learnpath' \ n AND ref_id_high_level = \ n AND ref_id_second_level = '0' \ n LIMIT 1 ': \ n \ nSQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND ref_id_second_level =' 0 '\ n LIMIT 1' at line 6 \ n ', referer: https://e-campus.actualizate.online/ main / exercise / exercise_submit.php? cidReq = PTA1 & id_session = 0 & gidReq = 0 & gradebook = 0 & origin = learnpath & exerciseId = 2 & origin = learnpath & learnpath_id = 1 & learnpath_item_id = 11 & learnpath_item_view_id = 0

FastCGI MariaDB 10

mod_fcgid: stderr: An exception occurred while executing 'SELECT *, referer: https://e-campus.actualizate.online/main/exercise/exercise_submit.php?cidReq=PTA1&id_session=0&gidReq=0&gradeig=0&origin=learnpath&exerciseId=2&origin=learnpath&learnpath_id = 1 & learnpath_item_id = 11 & learnpath_item_view_id = 0

[1]: https://i.stack.imgur.com/vpHpu.png
ademendieta
Newbie
 
Posts: 6
Joined: 26 Oct 2017, 07:40

Re: Cannot get Test Results to save

Postby lguirao » 11 Mar 2018, 11:11

Hello,

I think you have an error with Xapian and search engine. You have to deactivate the Full-text search feature in Chamilo Administration

Regards,
Laura Guirao
Nosolored - Chamilo Official Provider
User avatar
lguirao
Major Contributor
 
Posts: 785
Joined: 18 Apr 2012, 07:12
Location: Granada (España)


Return to All topics, all versions

Who is online

Users browsing this forum: No registered users and 1 guest