test results
A module we've (that is Håvard) been working on for a long time is now ready for release to the community! We called it Certify, it is mighty fine, and this is what it does:
Certify will let you add a certificate to a course. The certificate can contain one or more tests, and when a user has reached the pass score / pass percent for the test(s) bundled in the certificate, the user is allowed to download a pdf certificate.
Before the user has reaced the pass score he or she will see a progress bar under the "Certificates" tab, showing how far he or she is on the way to obtaining the certificate.
An instructor (or privileged user) can manage certificates, which means adding them, adding tests to them, and see student status for a given certificate.
Pictures are however more telling than words.
Here is certify for a student
This shows the certificate name, a description, and a progress bar showing how far the student is in obtaining the pass scores for the 8 tests in this course.
In the picture above I am 21% on my way to obtain the pass percent of 80% in all the 8 tests this certificate consist of.
In the picture below I have reached pass percent for all tests in this certificate. The certificate status is then 100%, and I am allowed to downdload a pdf certificate.

A certificate template can be created and uploaded by the instructor. If not a standard certificate is used (taken from the other Atutor Certificates module by Cindy).
Here's a screenshot of the certificate I got from the link above:

Yes, it is sweet!
Certify for an instructor
Here we are at manage -> certify, which shows the certificates in this course (there can be several certificates per course, allthough I imagine most people will only use one).

If we click on the "edit tests" button we get this:

This shows a list of all the tests that are found in this course, and lets you add as many of them as you wish to the certificate. Note that these tests must have a pass score or pass percent set. Also note that Certify only acts as a container. The pass scores or pass percents must be set in the tests themselves, and certify will only do the calculation for you.
The next screenshot shows what you will see when you click the "Student status" button:

..a sorted list of the students results. Note that certify only cares about the best result a student has in a test. That means a student can improve his score in a test (where more takes are allowed), but not the other way around.
That is pretty much it! We are using it in production today, and you can have a look at it in action if you register for the Medical Peace Work course
We have found it to be stable for production use, but there are still some bugs, minor issues and areas for improvement left in it, mainly for admins of it:
- You can upload a pdf template for each certificate, but there is no way to see which template you are using just yet, and
- If you upload a new template you will have to manually delete the old one form the server, as well as any cached files (named typically cert*.pdf (where * is a wildcard). The files are found within the ATutor content folder, in the "certify" folder.
- You will need pdftk installed at your (Linux) server! A server admin must typically do this.
- And you must manually set the path to pdftk in line 100 in download_certificate.php. Here's the line:
$exec = '/usr/bin/pdftk '.$template.' fill_form '.$filename.' output '.$filebase.'pdf flatten';, as you can see here our path to pdftk is"/usr/bin/pdftk ". - There are some tweaks that should be done in the GUI as a radio button isn't selected if you click the table row it belongs to. You will have to hit the actual button!
- And probably some more too
We're adding it here first, and at atutor.ca in a few days - get it while it's hot, give it a go, and give us feedback!
We are moving more into automated tests where the system takes care of what the pass score or pass percent is, and then gives the user a certificate to download (more on our new Certify module coming soon).
In this process we have discovered a problem with the "multiple answer" question type, that can be best illustrated with this screen shot:

ATutor tells the user how many points are available, and in this case there are 10 questions with 10 point available, which for the not-very-observant student means that all alternatives are right. The problem is still there if there was 5 points available: the student could check all alternatives and reach maximum score for that question.
The underlying problem here is that you can only give point per question, not per question alternative, which means that you need a human beeing to correct all tests and this automatic correcting is not possible.
To solve this I believe we need to be able to set points per alternative, and also to set negative points (so you can't just check all and get away with max score).
let's take a look at one question:

This is how I believe this question type must work. Now, this will create a new issue, which is that creating these questions will be harder, so we need to take that into account as well.
As this is pretty simple calculating I believe the system should do it by taking the point value set on a multiple answer question, and then divide it as positive and negative scores on each alternative, which if needed can be changed by the creator at a later time:

We are willing to do this job, but need feedback on how to best solve it! I also wonder if there will be any consequences for backups and restoring of tests, and the IMS QTI Question and Test Interoperability Support?

Improving the test submissions page! (or, review my code)
March 12, 2009 - 16:03 — Vegard A. JohansenI am not in any way a programmer, but I'm slowly learning some php, and today I actually made something useful for ATutor that has been requested by several of our instructors!
The code now work just as it should, but I can see that it might be a smarter way of solving this, without all the redundant lines! Also, I have some other plans to further expand this before I will wrap it all up in a patch.
Problem is this
For tests you can set no pass score, a pass score in points or a pass percent. This is good, but when an instructor views the test submissions on a test it isn't reflected anywhere wether the student passed or failed. This is what the results table looks like:

Problem here is that the the student needs 15 points to pass so three of these student failed and three passed, but the table doesn't tell the instructor this. And quite naturally, many of them wish to see this information!
So I set out to change the tools/tests/results.php to fix this problem. Here's what I did:
Line 86 looks like this:
<?php
//get test info
// [SQL]
$out_of = $row['out_of'];
$anonymous = $row['anonymous'];
$random = $row['random'];
$title = $row['title'];
?>But we need to use the pass percent and pass score info from the database too, so I added these two values as variables for simplicity:
<?php
//get test info
// [SQL]
$out_of = $row['out_of'];
$anonymous = $row['anonymous'];
$random = $row['random'];
$title = $row['title'];
$passscore = $row['passscore'];
$passpercent = $row['passpercent'];
?>So far so good, now our page knows this info too and we can use them later!
Move down to lije 223 and we find the table row with the test result data:
<td align="center">
<?php if ($out_of) {
if ($random) {
$out_of = get_random_outof($tid, $row['result_id']);
}
if ($row['final_score'] != '') {
echo $row['final_score'].'/'.$out_of;
} else {
echo _AT('unmarked');
}
} else {
echo _AT('na');
}
?>
</td>(intendation is better, blame my editor here). Now, this presents the score if the questions in the test has scores, but we want it to also say if the student passed or not, and make it work both for pass scores and pass percents, so I changed it all too:
<?php
$user_percent_score = $row['final_score'] / $out_of * 100;
// if the questions has points
if ($out_of) {
// same if it uses random questions
if ($random) {
$out_of = get_random_outof($tid, $row['result_id']);
}
// added by vegard
// if student has points and pass percent is set
if ($row['final_score'] != '' && $passpercent != '0' && $passscore == "0") {
// and the user percent score is larger than the pass percent
if ($user_percent_score >= $passpercent) {
echo "<span class=\"test_passed\">" .
$row['final_score'] . " / " .
$out_of . "
<img src=\"".$_base_path . "images/checkmark.gif" . "\">
</span>";
} else {
echo "<span class=\"test_failed\">" .
$row['final_score'] . ' / ' .
$out_of . "
<img src=\"".$_base_path . "images/x.gif" . "\">
</span>";
}
}
// elseif, students has points and pass points is set
elseif ($row['final_score'] != '' && $passscore != '0' && $passpercent == "0") {
// and the user point score is larger than the pass score
if ($row['final_score'] >= $passscore) {
echo "<span class=\"test_passed\">" .
$row['final_score']. ' / ' .
$out_of . "
<img src=\"".$_base_path . "images/checkmark.gif" . "\">
</span>";
} else {
echo "<span class=\"test_failed\">" .
$row['final_score'].' / ' .
$out_of . "
<img src=\"".$_base_path . "images/x.gif" . "\">
</span>";
}
}
// elseif, no pass score or pass percent is set, show raw score
elseif ($passscore == "0" && $passpercent == "0") {
echo $row['final_score'] . " / " . $out_of;
}
}
// else, mark is not applicable
else { echo _AT('na'); }
?>(Again, intendation is better) - now this actually works great, but as I'm repeating two chunks of pass / fail html code there must be a more elegant way of doing it, right?
Anyhow, the end result after these changes are:

I used existing graphics from ATutor so nothing new is added, and I made some styles that can be improved on, but atleast it works!
Further expansion
This solves some problems, but the submissions page can still be improved, and the first things I wish to do is add two more filters to it:
- You need to be able to filter by pass or fail too, so an instructor can choose to only see the ones that passed a test or failed a test.
- ..and more importaint: we need a way to hide redundant scores. The situation for many of our tests now is that the users can try many times to get it right, so you can easily get 300 submissions on a page for say 50 students. Now, the instructors are most often only interested in the 50 students, and wether they pass or fail, so we need a filter that only gets the best score a student has achieved, and then only displays that one result per student, making the instructor able to easily see which of his students passed or failed, without caring how many tries they have used.
Any ideas for this, and also other ways to improve this page are appreciated! I add the modified results.php page here so you can try it on your own install, but do take a backup!