We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1969e28 commit 1a95c69Copy full SHA for 1a95c69
1 file changed
blocks/TestBlock/TestBlock.php
@@ -79,8 +79,10 @@ public function student_view()
79
'vips14' => $this->vipsVersion('1.4')
80
);
81
}
82
-
83
- $assignment->recordAssignmentAttempt($user->id);
+ if ($GLOBALS['perm']->have_studip_perm('user', $this->_model->course->id, $user->id) &&
+ !$GLOBALS['perm']->have_studip_perm('tutor', $this->_model->course->id, $user->id)) {
84
+ $assignment->recordAssignmentAttempt($user->id);
85
+ }
86
87
return array_merge($this->getAttrArray(), array(
88
'active' => $active,
0 commit comments