mirror of
https://github.com/moodle/moodle.git
synced 2025-05-08 17:26:13 +02:00
Non-editing teacher not allowed to change the phase of a Exercise nor
delete the teacher's submission(s).
This commit is contained in:
parent
eb407d969f
commit
b14f1130a3
mod/exercise
@ -772,8 +772,10 @@ function exercise_list_submissions_for_admin($exercise) {
|
||||
foreach ($submissions as $submission) {
|
||||
$action = "<a href=\"submissions.php?action=adminamendtitle&id=$cm->id&sid=$submission->id\">".
|
||||
get_string("amendtitle", "exercise")."</a>";
|
||||
$action .= " | <a href=\"submissions.php?action=adminconfirmdelete&id=$cm->id&sid=$submission->id\">".
|
||||
get_string("delete", "exercise")."</a>";
|
||||
if (isteacheredit($course->id)) {
|
||||
$action .= " | <a href=\"submissions.php?action=adminconfirmdelete&id=$cm->id&sid=$submission->id\">".
|
||||
get_string("delete", "exercise")."</a>";
|
||||
}
|
||||
$table->data[] = array(exercise_print_submission_title($exercise, $submission),
|
||||
userdate($submission->timecreated), $action);
|
||||
}
|
||||
|
@ -352,9 +352,16 @@
|
||||
$tabs->names = array("1. ".get_string("phase1", "exercise"),
|
||||
"2. ".get_string("phase2", "exercise", $course->student),
|
||||
"3. ".get_string("phase3", "exercise", $course->student));
|
||||
$tabs->urls = array("view.php?id=$cm->id&action=setupassignment",
|
||||
"view.php?id=$cm->id&action=openexercise",
|
||||
"view.php?id=$cm->id&action=makeleaguetableavailable");
|
||||
if (isteacheredit($course->id)) {
|
||||
$tabs->urls = array("view.php?id=$cm->id&action=setupassignment",
|
||||
"view.php?id=$cm->id&action=openexercise",
|
||||
"view.php?id=$cm->id&action=makeleaguetableavailable");
|
||||
} else {
|
||||
// don't allow non-editing teacher to change phase
|
||||
$tabs->urls = array("view.php?id=$cm->id",
|
||||
"view.php?id=$cm->id",
|
||||
"view.php?id=$cm->id");
|
||||
}
|
||||
if ($exercise->phase) { // phase 1 or more
|
||||
$tabs->highlight = $exercise->phase - 1;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user