libdir.'/weblib.php'); require_once($CFG->dirroot.'/grade/querylib.php'); use local_treestudyplan; $INVITED_URL = "/local/treestudyplan/invited.php"; //admin_externalpage_setup('major'); $systemcontext = context_system::instance(); $PAGE->set_url("/local/treestudyplan/invitations.php",array()); require_login(); $PAGE->set_pagelayout('base'); $PAGE->set_context($systemcontext); $PAGE->set_title(get_string('manage_invites', 'local_treestudyplan')); $PAGE->set_heading(get_string('manage_invites', 'local_treestudyplan')); // Load javascripts $PAGE->requires->js_call_amd('local_treestudyplan/page-invitemanager', 'init'); $PAGE->requires->js_call_amd('local_treestudyplan/buttonlinks', 'init'); // retrieve list of courses that the student is enrolled in $sent = optional_param('sent','',PARAM_INT); if(!empty($sent)) { $invite = $DB->get_record('local_treestudyplan_invit', array('id' => $sent)); \core\notification::success(get_string('invite_resent_msg','local_treestudyplan',$invite)); }; print $OUTPUT->header(); print "
".get_string('invite_description', 'local_treestudyplan')."
"; $invites = $DB->get_records('local_treestudyplan_invit', array('user_id' => $USER->id)); print "".get_string('invite_name','local_treestudyplan')." | "; print "".get_string('invite_email','local_treestudyplan')." | "; print "".get_string('invite_date','local_treestudyplan')." | "; print ""; print ""; print ""; if(count($invites) > 0) { foreach($invites as $invite) { $testlink = $INVITED_URL."?key={$invite->invitekey}"; print " | ||
---|---|---|---|---|---|
{$invite->name} | "; print "{$invite->email} | "; print "".userdate($invite->date, "%x")." | "; print ""; print ""; print "name)."'"; print " data-confirmbtn='".get_string('send','local_treestudyplan')."'"; print " href='#' data-actionhref='edit-invite.php?resend={$invite->id}' title='".get_string('invite_tooltip_resend','local_treestudyplan')."'"; print " >"; print ""; print "name)."'"; print " data-confirmbtn='".get_string('delete')."'"; print " href='#' data-actionhref='edit-invite.php?delete={$invite->id}' title='".get_string('invite_tooltip_delete','local_treestudyplan')."'"; print " >"; print " | "; } } else { print "||
".get_string('invite_table_empty','local_treestudyplan')." |