} else { $link = vpl_mod_href('forms/submissionview.php', 'id', $id, 'userid', $userid, 'submissionid', $submission->id); } $date = '<a href="' . $link . '">' . userdate($submission->datesubmitted) . '</a>'; $sub = new mod_vpl_submission($vpl, $submission); $submissions[] = $sub; $table->data[] = array($nsub--, $date, s($sub->get_detail())); } echo '<div class="clearer"> </div>'; echo '<div style="text-align: center">'; echo '<img src="' . vpl_rel_url('submissionsgraph.php', 'id', $id, 'userid', $userid) . '" alt="files size evolution" />'; echo '</div>'; echo '<div class="clearer"> </div>'; echo '<div class="clearer"> </div>'; echo '<div style="text-align: center">'; echo '<img src="' . vpl_rel_url('workinggraph.php', 'id', $id, 'userid', $userid) . '" alt="workingperiods" />'; echo '</div>'; echo '<div class="clearer"> </div>'; echo html_writer::table($table); echo '<div style="text-align:center">'; $url_base = $CFG->wwwroot . '/mod/vpl/views/previoussubmissionslist.php?id=' . $id . '&userid=' . $userid . '&detailed='; $urls = array($url_base . '0', $url_base . '1'); echo $OUTPUT->url_select(array($urls[0] => get_string('detailedless'), $urls[1] => get_string('detailedmore')), $urls[$detailed]); echo '</div>'; if ($detailed) { $nsub = count($submissionslist); foreach ($submissions as $index => $sub) { echo '<hr><h2><a name="f' . $nsub . '"># ' . $nsub . '</a></h2>'; $nsub--; $sub->print_submission(); }
// // You should have received a copy of the GNU General Public License // along with VPL for Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Show URL to web service with token * * @package mod_vpl * @copyright 2014 Juan Carlos Rodríguez-del-Pino * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @author Juan Carlos Rodríguez-del-Pino <*****@*****.**> */ require_once dirname(__FILE__) . '/../../../config.php'; require_once dirname(__FILE__) . '/../vpl.class.php'; require_login(); $id = required_param('id', PARAM_INT); $vpl = new mod_vpl($id); $vpl->prepare_page('views/show_webservice.php', array('id' => $id)); $vpl->require_capability(VPL_VIEW_CAPABILITY); $log_url = vpl_rel_url('views/show_webservice.php', 'id', $id); if (!$vpl->is_visible()) { notice(get_string('notavailable')); } $vpl->print_header(get_string('createtokenforuser', 'core_webservice')); $vpl->print_view_tabs('view.php'); echo '<h1>' . get_string('webservice', 'core_webservice') . '</h1>'; echo '<h3>' . get_string('createtokenforuserdescription', 'core_webservice') . '</h3>'; $service_url = vpl_get_webservice_urlbase($vpl); echo $OUTPUT->box('<div style="white-space: pre-wrap">' . s($service_url) . '</div>'); \mod_vpl\event\vpl_webservice_token_viewed::log($vpl); notice('', vpl_mod_href('view.php', 'id', $id)); $vpl->print_footer();
global $CFG, $PGAE; /******************* BY ANUSHA ************************ FOR HIDING LEFT SIDE NAVIGATION *********************/ $context = context_course::instance($COURSE->id); if (user_has_role_assignment($USER->id, 5)) { $PAGE->requires->css('/student/custom.css'); } require_login(); $id = optional_param('id', null, PARAM_INT); // Course Module ID, or //$a = optional_param('a', null, PARAM_INT); // vpl ID $vpl = new mod_vpl($id); $vpl->prepare_page('view.php', array('id' => $id)); $vpl->require_capability(VPL_VIEW_CAPABILITY); $id = $vpl->get_course_module()->id; $log_url = vpl_rel_url('view.php', 'id', $id); if (!$vpl->is_visible()) { notice(get_string('notavailable')); } if (!$vpl->has_capability(VPL_MANAGE_CAPABILITY) && !$vpl->has_capability(VPL_GRADE_CAPABILITY)) { $vpl->network_check(); $vpl->password_check(); $userid = $USER->id; } else { $userid = optional_param('userid', $USER->id, PARAM_INT); } \mod_vpl\event\vpl_description_viewed::log($vpl); // Print the page header $PAGE->requires->css(new moodle_url('/mod/vpl/css/sh.css')); $vpl->print_header(get_string('description', VPL)); /// Print the main part of the page
$submissionid = $subinstance->id; if ($vpl->is_inconsistent_user($subinstance->userid, $userid)) { vpl_grade_header($vpl, $inpopup); print_error('vpl submission user inconsistence'); } if ($vpl->get_instance()->id != $subinstance->vpl) { vpl_grade_header($vpl, $inpopup); print_error('vpl submission vpl inconsistence'); } $submission = new mod_vpl_submission($vpl, $subinstance); if ($inpopup) { $link = vpl_mod_href('forms/gradesubmission.php', 'id', $id, 'userid', $userid, 'inpopup', $inpopup); } else { $link = vpl_mod_href('forms/gradesubmission.php', 'id', $id, 'userid', $userid); } $linkrel = vpl_rel_url('forms/gradesubmission.php', 'id', $id, 'userid', $userid); //no marked or marked by current user or automatic if ($subinstance->dategraded == 0 || $subinstance->grader == $USER->id || $subinstance->grader == 0) { if ($inpopup) { $href = $link; //vpl_rel_url('gradesubmission.php','inpopup',1); } else { $href = 'gradesubmission.php'; } $grade_form = new mod_vpl_grade_form($href, $vpl); if ($grade_form->is_cancelled()) { //Grading canceled vpl_inmediate_redirect($link); } else { if ($fromform = $grade_form->get_data()) { //Grade (new or update)
if ($startdate) { $row[] = $instance->startdate > 0 ? userdate($instance->startdate) : ''; } if ($duedate) { $row[] = $instance->duedate > 0 ? userdate($instance->duedate) : ''; } if ($grader) { if ($vpl->has_capability(VPL_GRADE_CAPABILITY) && $vpl->get_grade() != 0 && !$instance->example) { $info = vpl_list_util::count_graded($vpl); $totalsubs += $info['submissions']; $totalgraded += $info['graded']; $url = vpl_rel_url('views/submissionslist.php', 'id', $vpl->get_course_module()->id, 'selection', 'allsubmissions'); $row[] = '<a href="' . $url . '">' . $info['submissions'] . '</a>'; //Need mark? if ($info['submissions'] > $info['graded'] && $vpl->get_grade() != 0 && !($instance->duedate != 0 && $instance->duedate > time())) { $url = vpl_rel_url('views/submissionslist.php', 'id', $vpl->get_course_module()->id, 'selection', 'notgraded'); $diff = $info['submissions'] - $info['graded']; $row[] = '<div class="vpl_nm">' . $info['graded'] . ' <a href="' . $url . '">(' . $diff . ')</a><div>'; } else { //No grade able if ($vpl->get_grade() == 0 && $info['graded'] == 0) { $row[] = '-'; } else { $row[] = $info['graded']; } } } else { $row[] = ''; $row[] = ''; } }