Lectora and emailing test results

Hi


I have read the postings I can find about emailing test results from lectora - the ones I found used ASP which I dont have on my server so need to use PHP.


I use Moodle as my LMS which reports scores and I can also add a certificate module which issues a certificate if the assessment is passed and also emails the tutor.


My problem is that the department need to record all attempts of the assessment being taken - moodle only records the highest, lowest or average scores and not each attempt.


I have attempted to use a php script to send the email based on reading the examples shown for ASP.


When I create the lectora package, I have added the php page into the additional files section and in the assessment results tab selected submit test to CGI program with post as the method. In the submit results to box I have entered the name of the php page entered into the additional files option.


When I publish - the php file is included in the packaged contents to that appears to be working but I am not getting an email when a test is completed.


The php code I used as a test uses the php mail function - i am using this in other web pages on the server so I know the function itself is working.. code is below


The code will probably need tweaking but if the php page was called, even if I have the variables wrong etc then I would at least receive an email with something in which I am not


can anyone give some guidance please..


THanks


Ian




foreach($_POST as $key=>$value)

{

$$key=$value;

}


//$Question_0001;


$SendTo = "ian.mullineaux@blueyonder.co.uk";

$SentFrom = "From: noreply@nwaslearningzone.net";

$msg_header = "From: $SentFromn" . "Reply-To: $SentFromn";

$msg_subject = "Commander Assessment";

$msg="Name: " . $AICC_Student_Name . "/n/nScore: " . $Commander_Assessment_Score;

mail($SendTo, $msg_subject ,$msg ,$msg_header );


?>

Discussions have been disabled for this post