$userprogress = $OUTPUT->user_picture($marker, array("size" => 24, "popup" => true)); } $array[] = $userprogress . " " . floor($data->percentage) . "%"; $totalprogress += $data->totalcomments; } $chartstable->data[] = $array; if (is_siteadmin($USER) || $issupervisor) { $nummarkers = 1; } $generalprogress = floor($totalprogress / ($numcriteria * $nummarkers * $numdrafts) * 100); if ($generalprogress == 100 && intval($emarking->firststagedate) < time()) { $urldelphi = new moodle_url('/mod/emarking/marking/delphi.php', array('id' => $cm->id)); die("<script>location.href = '{$urldelphi}'</script>"); } } echo emarking_tabs_markers_training($context, $cm, $emarking, $generalprogress, 0); echo $OUTPUT->heading(get_string('marking_progress', 'mod_emarking'), 5); echo html_writer::table($chartstable); if ($emarking->type == EMARKING_TYPE_MARKER_TRAINING && $issupervisor) { $csvurl = new moodle_url('/mod/emarking/view.php', array('id' => $cm->id, 'exportcsv' => 'delphi')); $csvurlagreement = new moodle_url('/mod/emarking/view.php', array('id' => $cm->id, 'exportcsv' => 'agreement')); echo $OUTPUT->heading(get_string('exporttoexcel', 'mod_emarking'), 4); echo html_writer::start_div('exportbuttons'); echo $OUTPUT->action_icon($csvurl, new pix_icon('i/grades', get_string('exportgrades', 'mod_emarking'))); echo $OUTPUT->action_icon($csvurlagreement, new pix_icon('i/report', get_string('exportagreement', 'mod_emarking'))); echo html_writer::end_div(); } if (isset($userpercentage) && floor($userpercentage) == 100) { echo get_string('marking_completed', 'mod_emarking'); } }
$totalagreement = array_sum($sum["total"]); $avgagreement = count($sum["total"]) == 0 ? 0 : $totalagreement / count($sum["total"]); $avgagreement = round($avgagreement * 100, 0); // Show header echo $OUTPUT->header(); $firststagetable = new html_table(); $firststagetable->data[] = array($OUTPUT->heading("Por prueba", 5)); foreach ($dataexams as $sid => $d) { $examurl = new moodle_url("/mod/emarking/marking/agreement.php", array("id" => $cm->id, "exam" => $sid)); $firststagetable->data[] = array($OUTPUT->action_link($examurl, get_string("exam", "mod_emarking") . " " . $sid . emarking_create_progress_graph($d))); } $secondstagetable = new html_table(); $secondstagetable->data[] = array($OUTPUT->heading("Por Criterio", 5)); foreach ($datacriteria as $cid => $d) { $criterionurl = new moodle_url("/mod/emarking/marking/agreement.php", array("id" => $cm->id, "criterion" => $cid)); $secondstagetable->data[] = array($OUTPUT->action_link($criterionurl, $definition->rubric_criteria[$cid]['description'] . " " . emarking_create_progress_graph($d))); } $thirdstagetable = new html_table(); $thirdstagetable->data[] = array($OUTPUT->heading("Por Corrector", 5)); foreach ($datamarkers as $mid => $d) { $markerurl = new moodle_url("/mod/emarking/marking/agreement.php", array("id" => $cm->id, "marker" => $mid)); $thirdstagetable->data[] = array($OUTPUT->action_link($markerurl, $markersnames[$mid] . " " . emarking_create_progress_graph($d))); } // Get the course module for the emarking, to build the emarking url $urlagreement = new moodle_url('/mod/emarking/marking/agreement.php', array('id' => $cm->id)); echo emarking_tabs_markers_training($context, $cm, $emarking, 100, $avgagreement); echo "<h4>Porcentajes de acuerdo</h4>"; $maintable = new html_table(); $maintable->data[] = array(html_writer::table($firststagetable), html_writer::table($secondstagetable), html_writer::table($thirdstagetable)); echo html_writer::table($maintable); echo $OUTPUT->footer();
$examurl = new moodle_url("/mod/emarking/marking/agreement.php", array("id" => $cm->id, "exam" => $outlier->student)); $firststagetable->data[] = array($OUTPUT->action_link($examurl, get_string("exam", "mod_emarking") . ": " . $numberstudent . emarking_create_progress_graph(floor($value)))); } $avg = $avg / $numberstudent; $secondstagetable = new html_table(); $secondstagetable->data[] = array($OUTPUT->heading("Por Criterio", 5)); $outlierxcriteria = $DB->get_records_sql($sqlcountpercriteria, $param); foreach ($outlierxcriteria as $outlier) { $value = (1 - $sumbycriteria[$outlier->criterionid] / $outlier->count) * 100; $criterionurl = new moodle_url("/mod/emarking/marking/agreement.php", array("id" => $cm->id, "criterion" => $outlier->criterionid)); $secondstagetable->data[] = array($OUTPUT->action_link($criterionurl, $outlier->criterianame . ": " . emarking_create_progress_graph(floor($value)))); } $param = array($cm->instance, $cm->instance); $thirdstagetable = new html_table(); $thirdstagetable->data[] = array($OUTPUT->heading("Por Corrector", 5)); $outlierxmarker = $DB->get_records_sql($sqlcountpermarker, $param); $numbermarker = 0; foreach ($outlierxmarker as $outlier) { $numbermarker++; $value = (1 - $outlier->count / $outlier->otro) * 100; $markerurl = new moodle_url("/mod/emarking/marking/agreement.php", array("id" => $cm->id, "marker" => $outlier->markerid)); $thirdstagetable->data[] = array($OUTPUT->action_link($markerurl, get_string("marker", "mod_emarking") . ": " . $numbermarker . ": " . emarking_create_progress_graph(floor($value)))); } // Get the course module for the emarking, to build the emarking url $urlagreement = new moodle_url('/mod/emarking/marking/agreement.php', array('id' => $cm->id)); echo emarking_tabs_markers_training($context, $cm, $emarking, 100, floor($avg)); echo "<h4>Porcentajes de acuerdo</h4>"; $maintable = new html_table(); $maintable->data[] = array(html_writer::table($firststagetable), html_writer::table($secondstagetable), html_writer::table($thirdstagetable)); echo html_writer::table($maintable); echo $OUTPUT->footer();
} else { $link = new moodle_url('/mod/emarking/marking/modify.php', array('id' => $cm->id, 'criterionid' => $agree->criterionid, 'commentid' => $agree->commentid, 'emarkingid' => $emarking->id)); $status = $OUTPUT->action_link($link, 'Modify', new popup_action('click', $link)); } $grupo = explode(",", $agree->grupo); foreach ($grupo as $data) { if ($data == $agree->levelid) { $square .= '<div style="float:left;height:20px;border:2px solid #000;background-color:#F3F36F;border-color: #48D063"><center>' . $data . '</center></div>'; } else { $square .= '<div style="float:left;height:20px;border:2px solid #000;background-color:#ffffff;border-color: #48D063"><center>' . $data . '</center></div>'; } if ($data == $agree->agreement) { $squareagreement .= '<div style="float:left;height:20px;border:2px solid #000;background-color:#FF7878;border-color: #48D063"><center>' . $data . '</center></div>'; } else { $squareagreement .= '<div style="float:left;height:20px;border:2px solid #000;background-color:#ffffff;border-color: #48D063"><center>' . $data . '</center></div>'; } } $firststagetable->data[] = array($agree->description, $agree->student, $square, $squareagreement, $status); } // Show header echo $OUTPUT->header(); //TODO: se debe agregar el avance de delphi al tabtree echo emarking_tabs_markers_training($context, $cm, $emarking, 100, 0); echo html_writer::table($firststagetable); echo $OUTPUT->footer(); ?> <script type="text/javascript" > function popUpClosed() { window.location.reload(); } </script>