$allow_students = 1; pretop(); // include("userStuff.inc"); // include("messageboard/messageboardFuncs.inc"); include("$inc/messageboardStuff.inc"); include("probe/probeStuff.inc"); top(); // let's see who this user is $uid = $auth->auth["uid"]; $dbp = new $DATABASE; $query = "select * from probe where published=1 AND startdate <= now()"; $dbp->query($query); $numprobes = $dbp->num_rows(); // make sure there are some if ($numprobes < 1) fatalError("Sorry, but there are no published probes available right now."); print ("
\n"); ?>
bottom(); ?>for($i=0; $i < $numprobes; $i++) { $dbp->next_record(); // have they taken this probe? $thisprobe = $dbp->f("ID"); $completion = haveTaken($thisprobe, $uid); switch($completion) { case 0: // never took it before $txt = "Take this probe"; $url = "post.php?pID=$thisprobe"; break; case 2: // partially completed // which question do they do next? $nextQ = getNextQuestion($thisprobe, $uid); $txt = "Complete this probe"; $url = "post.php?pID=$thisprobe&qID=$nextQ"; break; case 1: // already took it $txt = "Review this probe"; $url = "view.php?pID=$thisprobe"; // if they are a teacher, 'review' means see all Q's without the extra info! if (isAdult($uid)) $url .= "&noanswers=1"; break; } print ("
"); } if ($perm->has_one_perm("uberadmin,netadmin")) { $editlisturl = $sess->url("/probe/edit.php"); print (" ". $dbp->f("name") . " \n"); // name of the probe print ("url("/probe/".$url) . "\">" . $txt . " "); // the user's choices // if they're a teacher, tack on a third column offering the stats for the probe... // and a fourth to let them see the if (isAdult($uid)) { $url = $sess->url("/probe/view.php?pID=$thisprobe"); print ("Statistics and \n"); } // and finally, if they're an admin of some sort, give them the ability to edit this sucker. if ($perm->has_one_perm("uberadmin,netadmin")) { $editurl = $sess->url("/probe/edit.php?pID=$thisprobe"); print ("
DiscussionEdit this Probe \n"); } print ("\n"); } if (isAdult($uid)) { $url = $sess->url("http://intec.kidsolve.com/messageboard/list.php?mID=3&fID=2"); print " To create new Probes or to edit unpublished Probes, click here \n"; } ?> To see notes and old summaries of these probes, click here.