if (!$evaluationcompletedtmp) { $evaluationcompleted = evaluation_get_current_completed($evaluation->id, false, $classid,false,$trainee_id); if ($evaluationcompleted) { //copy the values to evaluation_valuetmp create a completedtmp $evaluationcompletedtmp = evaluation_set_tmp_values($evaluationcompleted); } } } else { if($trainer_exist|| is_siteadmin()) $temp = false; else $temp = true; $evaluationcompletedtmp = evaluation_get_current_completed($evaluation->id, $temp, $classid,false,$trainee_id,$userid); } /// Print the main part of the page /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// $analysisurl = new moodle_url('/local/evaluations/analysis.php', array('id' => $id, 'clid' => $classid)); if ($classid > 0) { $analysisurl->param('clid', $classid); } /*rajesh has written this code*/
$ected .= '</font>'; $line[] = $ected; } else { //if the user is not known so we cannot save the values temporarly if (!isloggedin() or isguestuser()) { $completefile = 'complete_guest.php'; $guestid = sesskey(); } else { $completefile = 'complete.php'; $guestid = false; } $url_params = array('id' => $evaluation->id, 'clid' => $evaluation->classid, 'gopage' => 0); $completeurl = new moodle_url('/local/evaluations/' . $completefile, $url_params); $evaluationcompletedtmp = evaluation_get_current_completed($evaluation->id, true, $evaluation->classid, $guestid); if ($evaluationcompletedtmp) { if ($startpage = evaluation_get_page_to_continue($evaluation->id, $evaluation->classid, $guestid)) { $completeurl->param('gopage', $startpage); } if ($itemscount > 0) { $line[] = '<a href="' . $completeurl->out() . '">' . get_string('continue_the_form', 'local_evaluations') . '</a>'; } else { $line[] = "No questions are available"; } } else { if ($itemscount > 0) { $line[] = '<a href="' . $completeurl->out() . '">' . get_string('complete_the_form', 'local_evaluations') . '</a>'; } else { $line[] = "No questions are available"; }