Use gam.cfg/use_course_owner_access in course copyfrom.

This commit is contained in:
Ross Scroggs
2024-02-21 14:20:40 -08:00
parent 115caf2486
commit a0e4be4b50
3 changed files with 21 additions and 7 deletions

View File

@ -10,6 +10,12 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation
### 6.70.02
In 6.69.00, GAM starting using course owner access when using `copyfrom` in `gam create|update course`
regardless of the value of `gam.cfg/use_course_owner_access`. This prevents copying from courses
with a deleted user. GAM now uses the value of `gam.cfg/use_course_owner_access` when `copyfrom` is used.o
### 6.70.01
Added `gmail_cse_incert_dir` and `gmail_cse_inkey_dir` path variables to `gam.cfg` that provide
@ -25,10 +31,10 @@ This is an initial, minimally tested release; proceed with care and report all i
### 6.69.00
Added `use_classroom_owner_access` Boolean variable to `gam.cfg` that controls how GAM gets
classroom member information and removes students/teachers. Client access does not provide
Added `use_course_owner_access` Boolean variable to `gam.cfg` that controls how GAM gets
classroom member information and removes students/teachers. Client/admin access does not provide
complete information about non-domain students/teachers.
* `False` - Use client access; this is the default. Use if you don't have non-domain members in your courses.
* `False` - Use client/admin access; this is the default. Use if you don't have non-domain members in your courses.
* `True` - Use service account access as the classroom owner. An extra API call is required per course to authenticate the owner; this will affect performance
Added the following command which must be used to delete classroom invitations for non-domain students/teachers.

View File

@ -2,6 +2,12 @@
Merged GAM-Team version
6.70.02
In 6.69.00, GAM starting using course owner access when using `copyfrom` in `gam create|update course`
regardless of the value of `gam.cfg/use_course_owner_access`. This prevents copying from courses
with a deleted user. GAM now uses the value of `gam.cfg/use_course_owner_access` when `copyfrom` is used.
6.70.01
Added `gmail_cse_incert_dir` and `gmail_cse_inkey_dir` path variables to `gam.cfg` that provide

View File

@ -44381,10 +44381,12 @@ class CourseAttributes():
else:
return True
# ocroom - copyfrom course owner
if self.announcementStates or self.materialStates or self.workStates or self.copyTopics or self.members != 'none':
_, self.ocroom = buildGAPIServiceObject(API.CLASSROOM, f'uid:{self.ownerId}')
if self.ocroom is None:
return False
self.ocroom = self.croom
if GC.Values[GC.USE_COURSE_OWNER_ACCESS]:
if self.announcementStates or self.materialStates or self.workStates or self.copyTopics or self.members != 'none':
_, self.ocroom = buildGAPIServiceObject(API.CLASSROOM, f'uid:{self.ownerId}')
if self.ocroom is None:
return False
if self.members != 'none':
_, self.teachers, self.students = _getCourseAliasesMembers(self.croom, self.ocroom, self.courseId, {'members': self.members},
'nextPageToken,teachers(profile(emailAddress,id))',