MantisBT - ATutor
View Issue Details
0003528ATutorTests/Surveyspublic2008-08-05 02:332008-08-21 09:33
0003528: Multiple submission deletion + 7 bugfixes
The diff attached enables group deletion of test submissions (tools/tests/results.php and tools/tests/delete_result.php). It replaces radio buttons with checkboxes and adds a "Select/unselect all" checkbox. It's a frequently used feature here, especially in self-assessment tests where attempts are usually not limited.
The changes reuse HTML and JavaScript code from admin/users.php.

Also, the diff fixes the following existing bugs (unless otherwise noted, they're in tools/tests/results.php):
1. Security: Instructors can delete arbitrary submissions in others' courses by tweaking a URL query (tools/tests/delete_result.php).
2. In the confirmation dialog, "%s" appears literally (tools/tests/delete_result.php).
3. "< em >Anonymous< /em >" (w/o spaces) appears literally in full name field in anonymous tests.
4. Table gets empty in anonymous tests when sorted by name or score (SQL query flaw).
5. Bogus full name in guest submissions.
6. There's no test title visible (though programmed to be there).
7. No error messages when clicking "Delete" with no items selected.

The diff is tested in 1.6.1 pl1 and should work under r7769 as there've been no changes there since. Please consider adding it to the trunk.
You might also want to rename "delete_result.php" to "delete_results.php" with appropriate changes to paths in these two files, and rename and/or update AT_FEEDBACK_RESULT_DELETED.
No tags attached.
diff results_group-delete_plus_bugfixes.diff (8,090) 2008-08-05 02:33
Issue History
2008-08-05 02:33IndieRectNew Issue
2008-08-05 02:33IndieRectFile Added: results_group-delete_plus_bugfixes.diff
2008-08-05 02:33IndieRectAffects version => SVN
2008-08-08 03:17IndieRectNote Added: 0003118
2008-08-20 11:03gregStatusnew => resolved
2008-08-20 11:03gregFixed in Version => 1.6.2
2008-08-20 11:03gregResolutionopen => fixed
2008-08-20 11:03gregAssigned To => greg
2008-08-20 11:03gregNote Added: 0003130
2008-08-20 11:10gregNote Added: 0003131
2008-08-20 11:16gregProduct Version1.6.1 => 1.6.2
2008-08-21 09:33gregStatusresolved => closed

2008-08-08 03:17   
PHP 4 compatibility issue: replace lines 10..11 of the diff:

+foreach ($rids as &$id) {
+ $id = intval($id);


+foreach ($rids as $k => $id) {
+ $rids[$k] = intval($id);
2008-08-20 11:03   
All applied. Feedback updated to reflect delete multiple files.
FYI include your name or something in the comments so you get credited with the fixes you're submitting. thanks Indie
2008-08-20 11:10   
the feedback still needs work, perhaps listing the login or full name and date for each of the results being deleted.