Esempio n. 1
0
$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();
Esempio n. 2
0
    $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();
Esempio n. 3
0
/**
 * Creates an especial array with the navigation tabs for emarking markers training mode
 *
 * @param unknown $context
 *            The course context to validate capabilit
 * @param unknown $cm
 *            The course module (emarking activity)
 * @return multitype:tabobject
 */
function emarking_tabs_markers_training($context, $cm, $emarking, $generalprogress, $delphiprogress)
{
    global $CFG;
    global $USER;
    global $OUTPUT;
    //tab's icons
    $timeicon = $OUTPUT->pix_icon('i/scheduled', null);
    $scalesicon = $OUTPUT->pix_icon('i/scales', null);
    //array for tabs data
    $tabs = array();
    $firststagetable = new html_table();
    $firststagetable->data[] = array(get_string('stage', 'mod_emarking'), $timeicon . " " . get_string('marking_deadline', 'mod_emarking'), $scalesicon . " " . get_string('stage_general_progress', 'mod_emarking'));
    if ($generalprogress >= 100) {
        $firststagetable->data[] = array(get_string('delphi_stage_one', 'mod_emarking'), "&nbsp;", $OUTPUT->pix_icon('i/grade_correct', ""));
    } else {
        $firststagetable->data[] = array(get_string('delphi_stage_one', 'mod_emarking'), emarking_time_difference($emarking->firststagedate, time(), false), emarking_create_progress_graph($generalprogress));
    }
    $firststagetable->data[] = array(get_string('delphi_stage_two', 'mod_emarking'), emarking_time_difference($emarking->secondstagedate, time(), false), emarking_create_progress_graph($delphiprogress));
    return html_writer::table($firststagetable);
}