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 152 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


Return to All topics, all versions

Who is online

Users browsing this forum: No registered users and 1 guest