$detailed = abs(optional_param('detailed', 0, PARAM_INT)) % 2; $vpl = new mod_vpl($id); $vpl->prepare_page('views/previoussubmissionslist.php', array('id' => $id, 'userid' => $userid)); $course = $vpl->get_course(); $vpl->require_capability(VPL_GRADE_CAPABILITY); \mod_vpl\event\submission_previous_upload_viewed::log(array('objectid' => $vpl->get_instance()->id, 'context' => context_module::instance($id), 'relateduserid' => $userid)); //Load strings $strdatesubmitted = get_string('datesubmitted', VPL); $strdescription = get_string('description', VPL); if ($detailed) { $PAGE->requires->css(new moodle_url('/mod/vpl/css/sh.css')); $PAGE->requires->css(new moodle_url('/mod/vpl/editor/VPLIDE.css')); } //Print header $vpl->print_header(get_string('previoussubmissionslist', VPL)); $vpl->print_view_tabs(basename(__FILE__)); $table = new html_table(); $table->head = array('#', $strdatesubmitted, $strdescription); $table->align = array('right', 'left', 'right'); $table->nowrap = array(true, true, true); $submissionslist = $vpl->user_submissions($userid); $submissions = array(); $nsub = count($submissionslist); foreach ($submissionslist as $submission) { if ($detailed) { $link = '#f' . $nsub; } 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);
// // 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();