MantisBT - ATutor
View Issue Details
0003405ATutorTests/Surveyspublic2008-05-21 09:582008-08-21 08:54
cindy 
cindy 
normalminoralways
closedfixed 
1.6.1 
1.6.1 
SVN
0003405: "Divide by Zero" warning in tests that use pass percentage but questions' weights have not been set
If the test is defined to use pass percentage but the weights of the questions in the test haven't been set, "Warning: Division by zero in /opt/lampp/htdocs/at161/tools/view_results.php on line 122" occurs.

This is because the calculation of test result, in percentage, is calculated by test_score/total_weight. total_weight is 0 in this case.
No tags attached.
Issue History
2008-05-21 09:58cindyNew Issue
2008-05-21 09:58cindyAffects version => SVN
2008-05-21 09:59cindyStatusnew => resolved
2008-05-21 09:59cindyFixed in Version => 1.6.1
2008-05-21 09:59cindyResolutionopen => fixed
2008-05-21 09:59cindyAssigned To => cindy
2008-05-21 09:59cindyNote Added: 0002944
2008-08-21 08:54gregStatusresolved => closed

Notes
(0002944)
cindy   
2008-05-21 09:59   
Affected script: tools/view_results.php

If test uses pass percentage and total_weight is 0, don't display any feedback.