MantisBT - ATutor
View Issue Details
0004494ATutor- no cat -public2010-08-18 06:362010-12-20 10:19
greg 
cindy 
normalminoralways
closedfixed 
 
2.0.1 
SVN
0004494: prerequisite test for tests
It appears that setting a prerequisite test for a folder or page does not hide tests that might contained in that folder, or that page.
No tags attached.
Issue History
2010-08-18 06:36gregNew Issue
2010-08-18 06:36gregAffects version => SVN
2010-08-18 06:37gregNote Added: 0004563
2010-08-18 06:50gregNote Added: 0004564
2010-08-20 08:01harrisNote Added: 0004566
2010-09-22 05:22gregStatusnew => assigned
2010-09-22 05:22gregAssigned To => cindy
2010-09-29 12:20cindyStatusassigned => resolved
2010-09-29 12:20cindyFixed in Version => 2.0.1
2010-09-29 12:20cindyResolutionopen => fixed
2010-09-29 12:20cindyNote Added: 0004673
2010-10-19 12:29gregNote Added: 0004725
2010-10-19 12:29gregStatusresolved => assigned
2010-10-20 06:32cindyStatusassigned => resolved
2010-10-20 06:32cindyNote Added: 0004726
2010-12-20 10:19gregStatusresolved => closed

Notes
(0004563)
greg   
2010-08-18 06:37   
add to the next patch
(0004564)
greg   
2010-08-18 06:50   
Also, when a prerequisite and an actual test are created for a content page the actual test shows up, but not the prerequite.
(0004566)
harris   
2010-08-20 08:01   
test
(0004673)
cindy   
2010-09-29 12:20   
SVN revision: 10246

Solution:
1. Include parent content id into the post test url
2. The first thing to display a post test is to check if its parent content has pre-requisite tests that the user has not passed.
If there is,
* For instructors: see the message that a pretest is associated with this content and proceed to display the post test
* For students: re-direct to pre-test, when pass the pre-test, direct the user to the parent content page. The students must go thru the content to get to the post test.

Affected scripts:
content.php
include/classes/ContentManager.class.php
mods/_standard/tests/test_intro.php
(0004725)
greg   
2010-10-19 12:29   
still seems to be a problem
(0004726)
cindy   
2010-10-20 06:32   
SVN revision: 10341, 10342

If the url passed into url_rewrite() is:
"mods/_standard/tests/test_intro.php?tid=4&in_cid=150"

Output is:
"mods/_standard/tests/test_intro.php/tid/4/amp;in_cid/150"

"amp;" in the output disturbs the $_GET var. The fix is, instead of htmlentities on the in url, do it on the out url.

Also modified "mods/_standard/tests/test_intro.php" to handle the failure return "-1" from getPretest()

Affected scripts:
include/classes/ContentManager.class.php
mods/_standard/tests/test_intro.php