Repaired invitation link not working when moodle is installed in a subfolder on the webserver

This commit is contained in:
PMKuipers 2024-12-27 23:22:49 +01:00
parent 41676e1715
commit fb92b0bcd6

View file

@ -26,7 +26,7 @@ require_once("../../config.php");
require_once($CFG->libdir.'/weblib.php');
require_once($CFG->dirroot.'/grade/querylib.php');
$invitedurl = "/local/treestudyplan/invited.php";
$invitedurl = "{$CFG->wwwroot}/local/treestudyplan/invited.php";
$systemcontext = context_system::instance();
@ -97,16 +97,16 @@ if (!get_config("local_treestudyplan", "enableplansharing")) {
print "<a class='m-action-resend m-action-confirm'";
print " data-confirmtext='".get_string('invite_confirm_resend', 'local_treestudyplan', $invite->name)."'";
print " data-confirmbtn='".get_string('send', 'local_treestudyplan')."'";
print " href='#' data-actionhref='edit-invite.php?resend={$invite->id}' title='"
print " href='#' data-actionhref='{$CFG->wwwroot}/local/treestudyplan/edit-invite.php?resend={$invite->id}' title='"
.get_string('invite_tooltip_resend', 'local_treestudyplan')."'";
print " ><i class='fa fa-envelope'></i></a>";
print "<a href='edit-invite.php?update={$invite->id}'><i class='fa fa-pencil' title='"
print "<a href='{$CFG->wwwroot}/local/treestudyplan/edit-invite.php?update={$invite->id}'><i class='fa fa-pencil' title='"
.get_string('invite_tooltip_edit', 'local_treestudyplan')."'></i></a>";
print "<a class='m-action-delete m-action-confirm'";
print " data-confirmtext='".get_string('invite_confirm_delete', 'local_treestudyplan', $invite->name)."'";
print " data-confirmbtn='".get_string('delete')."'";
print " href='#' data-actionhref='edit-invite.php?delete={$invite->id}' title='"
print " href='#' data-actionhref='{$CFG->wwwroot}/local/treestudyplan/edit-invite.php?delete={$invite->id}' title='"
.get_string('invite_tooltip_delete', 'local_treestudyplan')."'";
print " ><i class='fa fa-trash'></i></a>";
@ -117,7 +117,7 @@ if (!get_config("local_treestudyplan", "enableplansharing")) {
}
print "</tbody></table>";
print "<a class='btn btn-info' href='/local/treestudyplan/edit-invite.php?add=true' class='btn btn-primary' id='add_invite'>";
print "<a class='btn btn-info' href='{$CFG->wwwroot}/local/treestudyplan/edit-invite.php?add=true' class='btn btn-primary' id='add_invite'>";
print "<i class='fa fa-plus'></i> ".get_string('invite_button_new', 'local_treestudyplan')."</a>";
print $OUTPUT->footer();