File tree 2 files changed +15
-4
lines changed
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -7855,10 +7855,18 @@ public static function getExpirationDateByRole($status)
7855
7855
7856
7856
public static function getAllowedRolesAsTeacher (): array
7857
7857
{
7858
- return [
7859
- COURSEMANAGER ,
7860
- SESSIONADMIN ,
7861
- ];
7858
+ if (api_get_configuration_value ('course_allow_student_role_to_be_teacher ' )) {
7859
+ return [
7860
+ STUDENT ,
7861
+ COURSEMANAGER ,
7862
+ SESSIONADMIN ,
7863
+ ];
7864
+ } else {
7865
+ return [
7866
+ COURSEMANAGER ,
7867
+ SESSIONADMIN ,
7868
+ ];
7869
+ }
7862
7870
}
7863
7871
7864
7872
/**
Original file line number Diff line number Diff line change 2530
2530
2531
2531
// Add the user first connexion column to the page main/admin/user_list.php
2532
2532
// $_configuration['admin_user_list_add_first_connexion_column'] = false;
2533
+
2534
+ // Set the following parameter to true to enable student to be assign as teacher of a course
2535
+ //$_configuration['course_allow_student_role_to_be_teacher'] = false;
You can’t perform that action at this time.
0 commit comments