mirror of
https://github.com/PlagiarismCheck/moodle-plagiarism_pchkorg.git
synced 2024-12-22 12:10:08 +00:00
parent
8862dc050a
commit
87f8af6563
6
lib.php
6
lib.php
@ -329,7 +329,8 @@ class plagiarism_plugin_pchkorg extends plagiarism_plugin {
|
|||||||
$roles[] = strtolower($rolesData->shortname);
|
$roles[] = strtolower($rolesData->shortname);
|
||||||
}
|
}
|
||||||
// Moodle has multiple roles in courses.
|
// Moodle has multiple roles in courses.
|
||||||
$isstudent = !in_array('teacher', $roles)
|
$isstudent = in_array('student', $roles)
|
||||||
|
&& !in_array('teacher', $roles)
|
||||||
&& !in_array('editingteacher', $roles)
|
&& !in_array('editingteacher', $roles)
|
||||||
&& !in_array('managerteacher', $roles);
|
&& !in_array('managerteacher', $roles);
|
||||||
|
|
||||||
@ -742,8 +743,7 @@ display: inline-block;"
|
|||||||
$roles[] = strtolower($rolesData->shortname);
|
$roles[] = strtolower($rolesData->shortname);
|
||||||
}
|
}
|
||||||
// Moodle has multiple roles in courses.
|
// Moodle has multiple roles in courses.
|
||||||
$isstudent = in_array('student', $roles)
|
$isstudent = !in_array('teacher', $roles)
|
||||||
&& !in_array('teacher', $roles)
|
|
||||||
&& !in_array('editingteacher', $roles)
|
&& !in_array('editingteacher', $roles)
|
||||||
&& !in_array('managerteacher', $roles);
|
&& !in_array('managerteacher', $roles);
|
||||||
$isregistered = $apiprovider->auto_registrate_member($name, $USER->email, $isstudent ? 3 : 2);
|
$isregistered = $apiprovider->auto_registrate_member($name, $USER->email, $isstudent ? 3 : 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user