Community Forums

ATutor Bug Reports

1.6.2: cannot delete test submission


You must be signed-in to post.

AuthorSubject
 
Page: 1
vegard

Avatar for vegard
Subject: 1.6.2: cannot delete test submissionQuote this post in your reply
when trying to delete a test submission from a user this page is all blank on my php 4 install:

/atutor/tools/tests/delete_result.php?tid=5&rid=5

at php 5 it works, but the message is this:

Are you sure you want to delete these items?

Submissions: 1


(or 2, 3 etc if more submissions). it might not be a bug, but it doesn't make much of sense.

BTW: in my opinion there would be nothing wrong in stopping supporting php 4 from 1.6.3 and on. after all php 4 has been left for dead by the php developers for over a year now. we use php 4 but will update soonish
Posted: 2009-01-20 07:44:45
harris

Avatar for harris
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
Yes, it does print out the count of the submissions... I agree that the message is not quite useful.
Posted: 2009-01-20 10:15:07
harris

Avatar for harris
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
Mine works under php 4.4.9.

In reply to:
when trying to delete a test submission from a user this page is all blank on my php 4 install:

/atutor/tools/tests/delete_result.php?tid=5&rid=5

Posted: 2009-01-20 10:44:56
vegard

Avatar for vegard
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
not working on php 4.3.9 on Atutor 1.6.2, but working on the same server with Atutor 1.6.1 but gives the following message:

Are you sure you want to delete these items?

%s

Posted: 2009-01-21 06:08:18
vegard

Avatar for vegard
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
problem with the same / a related thing here it seems: www.atutor.ca/view/3/16290/1.html - also an old php and mysql version.

(I have the same mysql version as the guy reporting this - 4.1.22)
Posted: 2009-01-21 06:28:35
greg

Avatar for greg
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
In your php.ini, did you enable the following?

arg_separator.input = ";&"
Posted: 2009-01-21 09:15:53
vegard

Avatar for vegard
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
; List of separator(s) used by PHP to parse input URLs into variables.
; Default is "&".
; NOTE: Every character in this directive is considered as separator!
;arg_separator.input = ";&"

..but I'm guessing the ; means it's commentet out. I'll send it to the server admin and ask him to enable it, I'll update here when tested.
Posted: 2009-01-21 09:30:04
vegard

Avatar for vegard
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
enabled now, and apache restarted, but same result!
Posted: 2009-01-22 04:11:03
vegard

Avatar for vegard
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
..any ideas?
Posted: 2009-01-27 09:00:01
harris

Avatar for harris
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
I still have problems reproducing this issue. Judging from the code flow. It could be from the database delete query...
Posted: 2009-01-27 09:18:30
harris

Avatar for harris
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
He reported this:

#1052 - Column 'test_id' in where clause is ambiguous.


Though, I am not sure why MySQL has returned that error. Theoretically, that error will not be occur in the query. Anyway, if that error do occur in your system, you will experiencing the same thing when you are trying to delete a test submission. I haven't tried the fix he has suggested myself, but it could fix the problem for mysql 4.1.22 system.

In reply to:
problem with the same / a related thing here it seems: www.atutor.ca/view/3/16290/1.html - also an old php and mysql version.

(I have the same mysql version as the guy reporting this - 4.1....

Posted: 2009-01-27 09:51:50
vegard

Avatar for vegard
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
ok, I'll investigate some more, and try out the fix (assuming it won't break anything!)

..so that would be in tools/tests/delete_result.php, right?

I'll report back here tomorrow!
Posted: 2009-01-27 09:58:32
harris

Avatar for harris
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
Yes. tools/tests/delete_result


Replace line 27 with this:

$sql = "SELECT count(*) AS cnt FROM ".TABLE_PREFIX."tests_results R LEFT JOIN ".TABLE_PREFIX."tests USING (test_id) WHERE result_id IN ($rid) AND course_id = $_SESSION[course_id] AND R.test_id = $tid";
Posted: 2009-01-27 10:02:43
vegard

Avatar for vegard
Subject: Re: 1.6.2: cannot delete test submissionQuote this post in your reply
aight, have tested and can confirm that the new query works!
Posted: 2009-01-29 05:36:23
 
Page: 1

You must be signed-in to post.

Related Articles