Welcome Guest, Not a member yet? Register   Sign In
Generate a pdf certificate after finishing exam
#1

I have an online exam system which is able to generate a pdf certificate once a click on the view download button. However, I would like the system to automatically generate a pdf certificate once a user clicks on the Finish button. Please help.

My part of my exam controller

if ($this->input->post('Finish') == 'Finish') {
foreach ($this->input->post() as $key=>$value) {
$useroptions[$key] = $value;

if ($key != 'Finish') {
if (intval($value) == 0) {
$not_attempted++;
}

if($answers[$key] == intval($value)){
$score++;
}
}
}


The view for the download button is

<div class="col-md-4">
                        <a href="<?php echo base_url();?>user/certificate/<?php echo $h->quiz_id;?>" target="_blank">
                           <div class="btn bg-primary  exam-histry-btn">Download Certificate </div>
                        </a>
Reply


Messages In This Thread
Generate a pdf certificate after finishing exam - by cndunga - 09-27-2018, 03:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB