View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005396ATutorTests/Surveyspublic2013-12-06 13:032013-12-28 12:49
Assigned Tomancoolgunda 
PlatformOSOS Version
Product Version 
Target Version2.2Fixed in Version2.2 
Summary0005396: editing an expired test shows a queryDB error
DescriptionOn editing an "Expired test", it shows a queryDB error. However, it works fine when we edit an "Ongoing test".
TagsNo tags attached.
Affects versionSVN
SVN Revision#b08417f
Attached Files

- Relationships

-  Notes
mancoolgunda (developer)
2013-12-07 16:22

I have created a PR for this issue: [^]
greg (administrator)
2013-12-28 10:22

I have removed the TRUE parameter passed for the queryDB function for finding whether submissions are made for the test or not. Clearly, this is a query which would return multiple results(multiple students have submitted the test results) and hence the third parameter($oneRow) should be FALSE(by default) since this parameter is used to make an extra check for queries that are supposed to return just 0 or 1 row.

Another thing I changed was at Line 94.
Steps to reproduce this bug: If an instructor has created a test as "Anonymous" and then he receives submissions from students. After this, when he edits the test, he would not be able to change the "Anonymous" option of the test since the radio button would be disabled. Still when he submits the edit form after making other changes like "Title, Description", the anonymous field would change to 0 in the db.
This happens because $row_anonymous['anonymous'] would not return any result since $row_anonymous would be a multi-dimensional array (Array=>(Array=>(test_id: 1, anonymous: 1), Array=>(test_id: 1, anonymous: 1))) and hence it takes 0 by default.
However, by using $row_anonymous[0]['anonymous'] the first row's anonymous field is retrieved.
greg (administrator)
2013-12-28 12:49

closed for ATutor 2.2

- Issue History
Date Modified Username Field Change
2013-12-06 13:03 mancoolgunda New Issue
2013-12-07 16:22 mancoolgunda Note Added: 0006541
2013-12-28 10:22 greg SVN Revision# => b08417f
2013-12-28 10:22 greg Note Added: 0006577
2013-12-28 10:22 greg Status new => resolved
2013-12-28 10:22 greg Fixed in Version => 2.2
2013-12-28 10:22 greg Resolution open => fixed
2013-12-28 10:22 greg Assigned To => mancoolgunda
2013-12-28 12:49 greg Note Added: 0006592
2013-12-28 12:49 greg Status resolved => closed

Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker