$id = optional_param('id',-1,PARAM_INT); $pageurl = '/blocks/learning_plan/student/view.php?l_id=' . $lp_id; $context = context_system::instance(); $PAGE->set_context($context); $PAGE->set_url($pageurl); $PAGE->set_pagelayout('standard'); $PAGE->set_heading(get_string('learning_plan', 'block_learning_plan')); $PAGE->set_title(get_string('learning_plan', 'block_learning_plan')); $PAGE->navbar->ignore_active(); $PAGE->navbar->add(get_string("pluginname", 'block_learning_plan'), new moodle_url($pageurl)); echo $OUTPUT->header(); $collapse = true; if ($fromform= data_submitted()) { $status_id = status_id($fromform->l_id, $fromform->u_id, $fromform->t_id); $fromform->id = $status_id; $DB->update_record('learning_user_trainingplan', $fromform); redirect($PAGE->url, get_string('saved_changes', 'block_learning_plan'), 2); } //$employ_statusform = new employee_trainingstatus_form(null,array('l_id'=>$lp_id)); //$sql = 'select t_id, (select type_id from {learning_training} where id =t_id) as type_id, lp_id, lut.status, lut.remarks, `u_id` as id,(select training_name from {learning_training} where id =t_id) // as training, (select url from {learning_training} where id =t_id) as url, (select learning_plan from {learning_learningplan} where id =lp_id) as learning_plan, (SELECT // CONCAT(firstname," ", lastname)FROM {user} where username!="guest" AND id = u_id) as name,(select // start_date from {course} where id =t_id)as date1,(select end_date from {learning_training} // where id =t_id)as date2 from {learning_plan_training} lpt inner join {learning_user_trainingplan} lut // on lut.lpt_id=lpt.id where lpt.lp_id=? AND lut.u_id=?'; //ORDER BY $orderby'; ////$inc = 0; //$form_header = get_string('trainingstatus', 'block_learning_plan'); // // $setting = optional_param('setting', null, PARAM_INT);
?> </td> <td><?php echo $col[1][$k]; ?> </td> <td align="center"><?php echo golongan_id($col[2][$k])->NmGol1; ?> </td> <td><?php echo $col[3][$k]; ?> </td> <td><?php echo status_id($col[6][$k])->nama; ?> </td> <td align="center"> <a href="<?php echo $ed[$k]; ?> " title="Ubah"> <img src="css/images/edit_f2.png" border="0" width="16" height="16"> </a> </td> <td align="center"> <a href="<?php echo $del[$k]; ?> " title="Hapus">