gam7 7.20.1__py3-none-any.whl → 7.20.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gam/__init__.py +133 -91
- gam/gamlib/glclargs.py +1 -0
- gam/gamlib/glmsgs.py +1 -0
- gam/gamlib/glskus.py +1 -1
- {gam7-7.20.1.dist-info → gam7-7.20.3.dist-info}/METADATA +1 -1
- {gam7-7.20.1.dist-info → gam7-7.20.3.dist-info}/RECORD +9 -9
- {gam7-7.20.1.dist-info → gam7-7.20.3.dist-info}/WHEEL +0 -0
- {gam7-7.20.1.dist-info → gam7-7.20.3.dist-info}/entry_points.txt +0 -0
- {gam7-7.20.1.dist-info → gam7-7.20.3.dist-info}/licenses/LICENSE +0 -0
gam/__init__.py
CHANGED
|
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
|
28
|
-
__version__ = '7.20.
|
|
28
|
+
__version__ = '7.20.03'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -51233,7 +51233,7 @@ def printShowClassroomProfile(users):
|
|
|
51233
51233
|
|
|
51234
51234
|
# gam create course-studentgroups
|
|
51235
51235
|
# (course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] [states <CourseStateList>])
|
|
51236
|
-
# title <String>
|
|
51236
|
+
# ((title <String>)|(select <StringEntity))+
|
|
51237
51237
|
# [csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]]
|
|
51238
51238
|
def doCreateCourseStudentGroups():
|
|
51239
51239
|
croom = buildGAPIObject(API.CLASSROOM)
|
|
@@ -51243,10 +51243,13 @@ def doCreateCourseStudentGroups():
|
|
|
51243
51243
|
courseShowProperties = _initCourseShowProperties(['name'])
|
|
51244
51244
|
useOwnerAccess = GC.Values[GC.USE_COURSE_OWNER_ACCESS]
|
|
51245
51245
|
kwargs = {'courseId': None, 'body': {}}
|
|
51246
|
+
titles = []
|
|
51246
51247
|
while Cmd.ArgumentsRemaining():
|
|
51247
51248
|
myarg = getArgument()
|
|
51248
51249
|
if myarg == 'title':
|
|
51249
|
-
|
|
51250
|
+
titles.append(getString(Cmd.OB_STRING, maxLen=100))
|
|
51251
|
+
elif myarg == 'select':
|
|
51252
|
+
titles.extend(getEntityList(Cmd.OB_STRING_ENTITY, shlexSplit=True))
|
|
51250
51253
|
elif _getCourseSelectionParameters(myarg, courseSelectionParameters):
|
|
51251
51254
|
pass
|
|
51252
51255
|
elif myarg == 'csv':
|
|
@@ -51256,8 +51259,9 @@ def doCreateCourseStudentGroups():
|
|
|
51256
51259
|
csvPF.GetTodriveParameters()
|
|
51257
51260
|
else:
|
|
51258
51261
|
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
51259
|
-
if
|
|
51262
|
+
if not titles:
|
|
51260
51263
|
missingArgumentExit('title')
|
|
51264
|
+
jcount = len(titles)
|
|
51261
51265
|
if csvPF and FJQC.formatJSON:
|
|
51262
51266
|
csvPF.SetJSONTitles(['courseId', 'courseName', 'JSON'])
|
|
51263
51267
|
coursesInfo = _getCoursesInfo(croom, courseSelectionParameters, courseShowProperties, useOwnerAccess)
|
|
@@ -51272,29 +51276,36 @@ def doCreateCourseStudentGroups():
|
|
|
51272
51276
|
if not ocroom:
|
|
51273
51277
|
continue
|
|
51274
51278
|
kwargs['courseId'] = courseId
|
|
51275
|
-
|
|
51276
|
-
|
|
51277
|
-
|
|
51278
|
-
|
|
51279
|
-
|
|
51280
|
-
|
|
51281
|
-
|
|
51282
|
-
|
|
51283
|
-
|
|
51284
|
-
|
|
51285
|
-
|
|
51286
|
-
|
|
51287
|
-
|
|
51288
|
-
|
|
51289
|
-
|
|
51290
|
-
|
|
51291
|
-
|
|
51292
|
-
|
|
51293
|
-
|
|
51294
|
-
|
|
51295
|
-
|
|
51296
|
-
|
|
51297
|
-
|
|
51279
|
+
entityPerformActionNumItems([Ent.COURSE, courseId], jcount, Ent.COURSE_STUDENTGROUP, i, count)
|
|
51280
|
+
Ind.Increment()
|
|
51281
|
+
j = 0
|
|
51282
|
+
for title in titles:
|
|
51283
|
+
j += 1
|
|
51284
|
+
kwargs['body']['title'] = title
|
|
51285
|
+
kvList = [Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, None]
|
|
51286
|
+
try:
|
|
51287
|
+
studentGroup = callGAPI(ocroom.courses().studentGroups(), 'create',
|
|
51288
|
+
throwReasons=[GAPI.NOT_FOUND, GAPI.SERVICE_NOT_AVAILABLE, GAPI.NOT_IMPLEMENTED,
|
|
51289
|
+
GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED],
|
|
51290
|
+
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
|
51291
|
+
previewVersion='V1_20250630_PREVIEW',
|
|
51292
|
+
**kwargs)
|
|
51293
|
+
kvList[-1] = f"{studentGroup['title']}({studentGroup['id']})"
|
|
51294
|
+
if not csvPF:
|
|
51295
|
+
entityActionPerformed(kvList, j, jcount)
|
|
51296
|
+
elif not FJQC.formatJSON:
|
|
51297
|
+
csvPF.WriteRow({'courseId': courseId, 'courseName': course['name'],
|
|
51298
|
+
'studentGroupId': studentGroup['id'], 'studentGroupTitle': studentGroup['title']})
|
|
51299
|
+
else:
|
|
51300
|
+
csvPF.WriteRowNoFilter({'courseId': courseId, 'courseName': course['name'],
|
|
51301
|
+
'JSON': json.dumps(cleanJSON(studentGroup), ensure_ascii=False, sort_keys=True)})
|
|
51302
|
+
except GAPI.notFound as e:
|
|
51303
|
+
entityActionFailedWarning(kvList, str(e), j, jcount)
|
|
51304
|
+
except (GAPI.serviceNotAvailable, GAPI.notImplemented) as e:
|
|
51305
|
+
entityActionFailedExit([Ent.COURSE, courseId], str(e), j, jcount)
|
|
51306
|
+
except (GAPI.forbidden, GAPI.permissionDenied) as e:
|
|
51307
|
+
ClientAPIAccessDeniedExit(str(e))
|
|
51308
|
+
Ind.Decrement()
|
|
51298
51309
|
if csvPF:
|
|
51299
51310
|
csvPF.writeCSVfile('Course Student Groups')
|
|
51300
51311
|
|
|
@@ -51439,8 +51450,26 @@ def doClearCourseStudentGroups():
|
|
|
51439
51450
|
# (course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] [states <CourseStateList>])
|
|
51440
51451
|
# [showitemcountonly] [formatjson [quotechar <Character>]]
|
|
51441
51452
|
def doPrintCourseStudentGroups(showMembers=False):
|
|
51453
|
+
def _getCourseStudents():
|
|
51454
|
+
studentIdEmailMap = {}
|
|
51455
|
+
try:
|
|
51456
|
+
students = callGAPIpages(ocroom.courses().students(), 'list', 'students',
|
|
51457
|
+
throwReasons=[GAPI.NOT_FOUND, GAPI.SERVICE_NOT_AVAILABLE,
|
|
51458
|
+
GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED],
|
|
51459
|
+
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
|
51460
|
+
courseId=courseId, fields='nextPageToken,students(profile(id,emailAddress))',
|
|
51461
|
+
pageSize=GC.Values[GC.CLASSROOM_MAX_RESULTS])
|
|
51462
|
+
for student in students:
|
|
51463
|
+
studentIdEmailMap[student['profile']['id']] = student['profile']['emailAddress']
|
|
51464
|
+
except GAPI.notFound:
|
|
51465
|
+
pass
|
|
51466
|
+
except (GAPI.serviceNotAvailable, GAPI.notImplemented) as e:
|
|
51467
|
+
entityActionFailedExit([Ent.COURSE, courseId], str(e))
|
|
51468
|
+
except (GAPI.forbidden, GAPI.permissionDenied) as e:
|
|
51469
|
+
ClientAPIAccessDeniedExit(str(e))
|
|
51470
|
+
return studentIdEmailMap
|
|
51471
|
+
|
|
51442
51472
|
croom = buildGAPIObject(API.CLASSROOM)
|
|
51443
|
-
cd = buildGAPIObject(API.DIRECTORY)
|
|
51444
51473
|
csvPF = CSVPrintFile(['courseId', 'courseName', 'studentGroupId', 'studentGroupTitle'])
|
|
51445
51474
|
FJQC = FormatJSONQuoteChar(csvPF)
|
|
51446
51475
|
courseSelectionParameters = _initCourseSelectionParameters()
|
|
@@ -51492,6 +51521,8 @@ def doPrintCourseStudentGroups(showMembers=False):
|
|
|
51492
51521
|
if not showMembers and showItemCountOnly:
|
|
51493
51522
|
itemCount += len(studentGroups)
|
|
51494
51523
|
continue
|
|
51524
|
+
if showMembers:
|
|
51525
|
+
studentIdEmailMap = _getCourseStudents()
|
|
51495
51526
|
for studentGroup in studentGroups:
|
|
51496
51527
|
studentGroupId = studentGroup['id']
|
|
51497
51528
|
if not showMembers:
|
|
@@ -51504,7 +51535,7 @@ def doPrintCourseStudentGroups(showMembers=False):
|
|
|
51504
51535
|
row['JSON'] = json.dumps(cleanJSON(studentGroup), ensure_ascii=False, sort_keys=False)
|
|
51505
51536
|
csvPF.WriteRowTitles(row)
|
|
51506
51537
|
continue
|
|
51507
|
-
printGettingEntityItemForWhom(Ent.
|
|
51538
|
+
printGettingEntityItemForWhom(Ent.STUDENT, formatKeyValueList('', [Ent.Singular(Ent.COURSE_STUDENTGROUP), studentGroupId],
|
|
51508
51539
|
currentCount(i, count)))
|
|
51509
51540
|
pageMessage = getPageMessage()
|
|
51510
51541
|
try:
|
|
@@ -51519,7 +51550,7 @@ def doPrintCourseStudentGroups(showMembers=False):
|
|
|
51519
51550
|
itemCount += len(students)
|
|
51520
51551
|
continue
|
|
51521
51552
|
for member in students:
|
|
51522
|
-
member['userEmail'] =
|
|
51553
|
+
member['userEmail'] = studentIdEmailMap.get(member['userId'], member['userId'])
|
|
51523
51554
|
except GAPI.notFound as e:
|
|
51524
51555
|
entityActionFailedWarning([Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, studentGroupId], str(e))
|
|
51525
51556
|
continue
|
|
@@ -51551,8 +51582,29 @@ def doPrintCourseStudentGroups(showMembers=False):
|
|
|
51551
51582
|
# gam sync course-studentgroup-members <CourseID> <StudentGroupID> <UserTypeEntity>
|
|
51552
51583
|
# gam clear course-studentgroup-members <CourseID> <StudentGroupID>
|
|
51553
51584
|
def doProcessCourseStudentGroupMembers():
|
|
51554
|
-
def
|
|
51555
|
-
|
|
51585
|
+
def _getCourseStudents():
|
|
51586
|
+
studentIdEmailMap = {}
|
|
51587
|
+
studentEmailIdMap = {}
|
|
51588
|
+
try:
|
|
51589
|
+
students = callGAPIpages(ocroom.courses().students(), 'list', 'students',
|
|
51590
|
+
throwReasons=[GAPI.NOT_FOUND, GAPI.SERVICE_NOT_AVAILABLE,
|
|
51591
|
+
GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED],
|
|
51592
|
+
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
|
51593
|
+
courseId=courseId, fields='nextPageToken,students(profile(id,emailAddress))',
|
|
51594
|
+
pageSize=GC.Values[GC.CLASSROOM_MAX_RESULTS])
|
|
51595
|
+
for student in students:
|
|
51596
|
+
studentIdEmailMap[student['profile']['id']] = student['profile']['emailAddress'].lower()
|
|
51597
|
+
studentEmailIdMap[student['profile']['emailAddress'].lower()] = student['profile']['id']
|
|
51598
|
+
return (studentIdEmailMap, studentEmailIdMap)
|
|
51599
|
+
except GAPI.notFound as e:
|
|
51600
|
+
entityActionFailedExit([Ent.COURSE, courseId], str(e))
|
|
51601
|
+
except (GAPI.serviceNotAvailable, GAPI.notImplemented) as e:
|
|
51602
|
+
entityActionFailedExit([Ent.COURSE, courseId], str(e))
|
|
51603
|
+
except (GAPI.forbidden, GAPI.permissionDenied) as e:
|
|
51604
|
+
ClientAPIAccessDeniedExit(str(e))
|
|
51605
|
+
|
|
51606
|
+
def _getGroupCurrentStudents():
|
|
51607
|
+
printGettingEntityItemForWhom(Ent.STUDENT, formatKeyValueList('', [Ent.Singular(Ent.COURSE_STUDENTGROUP), studentGroupId], ''))
|
|
51556
51608
|
pageMessage = getPageMessage()
|
|
51557
51609
|
try:
|
|
51558
51610
|
return callGAPIpages(ocroom.courses().studentGroups().studentGroupMembers(), 'list', 'studentGroupMembers',
|
|
@@ -51570,18 +51622,24 @@ def doProcessCourseStudentGroupMembers():
|
|
|
51570
51622
|
except (GAPI.forbidden, GAPI.permissionDenied) as e:
|
|
51571
51623
|
ClientAPIAccessDeniedExit(str(e))
|
|
51572
51624
|
|
|
51573
|
-
def
|
|
51574
|
-
|
|
51575
|
-
|
|
51576
|
-
|
|
51577
|
-
|
|
51578
|
-
|
|
51579
|
-
|
|
51580
|
-
|
|
51581
|
-
|
|
51582
|
-
|
|
51583
|
-
|
|
51584
|
-
|
|
51625
|
+
def _validateClStudents(clStudents):
|
|
51626
|
+
status = True
|
|
51627
|
+
clStudentIds = []
|
|
51628
|
+
count = len(clStudents)
|
|
51629
|
+
i = 0
|
|
51630
|
+
kvList = [Ent.COURSE, courseId, Ent.STUDENT, '']
|
|
51631
|
+
for student in clStudents:
|
|
51632
|
+
i += 1
|
|
51633
|
+
student = normalizeEmailAddressOrUID(student)
|
|
51634
|
+
if student in studentIdEmailMap:
|
|
51635
|
+
clStudentIds.append(student)
|
|
51636
|
+
elif student in studentEmailIdMap:
|
|
51637
|
+
clStudentIds.append(studentEmailIdMap[student])
|
|
51638
|
+
else:
|
|
51639
|
+
kvList[-1] = student
|
|
51640
|
+
entityActionFailedWarning(kvList, Msg.STUDENT_NOT_IN_COURSE, i, count)
|
|
51641
|
+
status = False
|
|
51642
|
+
return clStudentIds if status else None
|
|
51585
51643
|
|
|
51586
51644
|
def _processStudent(function, kvList, kwargs, i, count):
|
|
51587
51645
|
try:
|
|
@@ -51600,85 +51658,69 @@ def doProcessCourseStudentGroupMembers():
|
|
|
51600
51658
|
except (GAPI.forbidden, GAPI.permissionDenied) as e:
|
|
51601
51659
|
ClientAPIAccessDeniedExit(str(e))
|
|
51602
51660
|
|
|
51603
|
-
def _addStudents(students
|
|
51661
|
+
def _addStudents(students):
|
|
51604
51662
|
count = len(students)
|
|
51605
51663
|
i = 0
|
|
51606
|
-
entityPerformActionNumItems([Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, studentGroupId], count, Ent.
|
|
51607
|
-
kvList = [Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, studentGroupId, Ent.
|
|
51664
|
+
entityPerformActionNumItems([Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, studentGroupId], count, Ent.STUDENT)
|
|
51665
|
+
kvList = [Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, studentGroupId, Ent.STUDENT, '']
|
|
51608
51666
|
kwargs = {'courseId': courseId, 'studentGroupId': studentGroupId, 'body': {'userId': ''}}
|
|
51667
|
+
Ind.Increment()
|
|
51609
51668
|
for student in students:
|
|
51610
51669
|
i += 1
|
|
51611
|
-
|
|
51612
|
-
|
|
51613
|
-
if userId is None:
|
|
51614
|
-
continue
|
|
51615
|
-
kvList[-1] = student
|
|
51616
|
-
else:
|
|
51617
|
-
userId = student
|
|
51618
|
-
kvList[-1] = convertUIDtoEmailAddress(f"id:{userId}", cd=cd, emailTypes=['user'])
|
|
51619
|
-
kwargs['body']['userId'] = userId
|
|
51670
|
+
kvList[-1] = studentIdEmailMap[student]
|
|
51671
|
+
kwargs['body']['userId'] = student
|
|
51620
51672
|
_processStudent('create', kvList, kwargs, i, count)
|
|
51673
|
+
Ind.Decrement()
|
|
51621
51674
|
|
|
51622
|
-
def _removeStudents(students
|
|
51675
|
+
def _removeStudents(students):
|
|
51623
51676
|
count = len(students)
|
|
51624
51677
|
i = 0
|
|
51625
|
-
entityPerformActionNumItems([Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, studentGroupId], count, Ent.
|
|
51626
|
-
kvList = [Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, studentGroupId, Ent.
|
|
51678
|
+
entityPerformActionNumItems([Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, studentGroupId], count, Ent.STUDENT)
|
|
51679
|
+
kvList = [Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, studentGroupId, Ent.STUDENT, '']
|
|
51627
51680
|
kwargs = {'courseId': courseId, 'studentGroupId': studentGroupId, 'userId': ''}
|
|
51681
|
+
Ind.Increment()
|
|
51628
51682
|
for student in students:
|
|
51629
51683
|
i += 1
|
|
51630
|
-
|
|
51631
|
-
|
|
51632
|
-
if userId is None:
|
|
51633
|
-
continue
|
|
51634
|
-
kvList[-1] = student
|
|
51635
|
-
else:
|
|
51636
|
-
userId = student
|
|
51637
|
-
kvList[-1] = convertUIDtoEmailAddress(f"id:{userId}", cd=cd, emailTypes=['user'])
|
|
51638
|
-
kwargs['userId'] = userId
|
|
51684
|
+
kvList[-1] = studentIdEmailMap[student]
|
|
51685
|
+
kwargs['userId'] = student
|
|
51639
51686
|
_processStudent('delete', kvList, kwargs, i, count)
|
|
51687
|
+
Ind.Decrement()
|
|
51640
51688
|
|
|
51641
51689
|
croom = buildGAPIObject(API.CLASSROOM)
|
|
51642
|
-
cd = buildGAPIObject(API.DIRECTORY)
|
|
51643
51690
|
action = Act.Get()
|
|
51644
51691
|
courseId = getString(Cmd.OB_COURSE_ID)
|
|
51645
51692
|
studentGroupId = getString(Cmd.OB_STUDENTGROUP_ID)
|
|
51646
51693
|
if action != Act.CLEAR:
|
|
51647
51694
|
_, clStudents = getEntityToModify(defaultEntityType=Cmd.ENTITY_USERS, groupMemberType=Ent.TYPE_USER)
|
|
51648
|
-
|
|
51695
|
+
clStudentIds = []
|
|
51649
51696
|
checkForExtraneousArguments()
|
|
51650
51697
|
_, count, coursesInfo = _getCoursesOwnerInfo(croom, [courseId], GC.Values[GC.USE_COURSE_OWNER_ACCESS])
|
|
51651
51698
|
if count == 0:
|
|
51652
51699
|
return
|
|
51653
51700
|
ocroom = coursesInfo[courseId]['croom']
|
|
51654
51701
|
courseId = coursesInfo[courseId]['id']
|
|
51702
|
+
studentIdEmailMap, studentEmailIdMap = _getCourseStudents()
|
|
51655
51703
|
if action in {Act.SYNC, Act.CLEAR}:
|
|
51656
|
-
currentStudents = [student['userId'] for student in
|
|
51704
|
+
currentStudents = [student['userId'] for student in _getGroupCurrentStudents()]
|
|
51705
|
+
if action != Act.CLEAR:
|
|
51706
|
+
clStudentIds = _validateClStudents(clStudents)
|
|
51707
|
+
if clStudentIds is None:
|
|
51708
|
+
return
|
|
51657
51709
|
if action == Act.CLEAR:
|
|
51658
|
-
_removeStudents(currentStudents
|
|
51710
|
+
_removeStudents(currentStudents)
|
|
51659
51711
|
elif action == Act.DELETE:
|
|
51660
|
-
_removeStudents(
|
|
51712
|
+
_removeStudents(clStudentIds)
|
|
51661
51713
|
elif action in {Act.ADD, Act.CREATE}:
|
|
51662
|
-
_addStudents(
|
|
51714
|
+
_addStudents(clStudentIds)
|
|
51663
51715
|
else: # elif action == Act.SYNC:
|
|
51664
51716
|
currentMembersSet = set(currentStudents)
|
|
51665
|
-
syncMembersSet = set()
|
|
51666
|
-
count = len(clStudents)
|
|
51667
|
-
i = 0
|
|
51668
|
-
kvList = [Ent.COURSE, courseId, Ent.COURSE_STUDENTGROUP, studentGroupId, Ent.USER, '']
|
|
51669
|
-
for student in clStudents:
|
|
51670
|
-
i += 1
|
|
51671
|
-
kvList[-1] = student
|
|
51672
|
-
userId = _getStudentUserId(kvList, student, i, count)
|
|
51673
|
-
if userId is None:
|
|
51674
|
-
continue
|
|
51675
|
-
syncMembersSet.add(userId)
|
|
51717
|
+
syncMembersSet = set(clStudentIds)
|
|
51676
51718
|
removeStudentsSet = currentMembersSet-syncMembersSet
|
|
51677
51719
|
addStudentsSet = syncMembersSet-currentMembersSet
|
|
51678
51720
|
Act.Set(Act.DELETE)
|
|
51679
|
-
_removeStudents(removeStudentsSet
|
|
51721
|
+
_removeStudents(removeStudentsSet)
|
|
51680
51722
|
Act.Set(Act.ADD)
|
|
51681
|
-
_addStudents(addStudentsSet
|
|
51723
|
+
_addStudents(addStudentsSet)
|
|
51682
51724
|
|
|
51683
51725
|
# gam print course-studentgroup-members [todrive <ToDriveAttribute>*]
|
|
51684
51726
|
# (course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] [states <CourseStateList>])
|
|
@@ -65062,7 +65104,7 @@ def _checkFileIdEntityDomainAccess(fileIdEntity, useDomainAdminAccess):
|
|
|
65062
65104
|
# (mappermissionsdomain <DomainName> <DomainName>)*
|
|
65063
65105
|
# [moveToNewOwnersRoot [<Boolean>]]
|
|
65064
65106
|
# [updatesheetprotectedranges [<Boolean>]]
|
|
65065
|
-
# [sendemail] [emailmessage <String>]
|
|
65107
|
+
# [sendemail|sendnotification] [emailmessage <String>]
|
|
65066
65108
|
# [showtitles] [nodetails|(csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]])]
|
|
65067
65109
|
def createDriveFileACL(users, useDomainAdminAccess=False):
|
|
65068
65110
|
moveToNewOwnersRoot = False
|
|
@@ -65106,7 +65148,7 @@ def createDriveFileACL(users, useDomainAdminAccess=False):
|
|
|
65106
65148
|
elif myarg in {'expiration', 'expires'}:
|
|
65107
65149
|
expirationLocation = Cmd.Location()
|
|
65108
65150
|
body['expirationTime'] = getTimeOrDeltaFromNow()
|
|
65109
|
-
elif myarg
|
|
65151
|
+
elif myarg in {'sendemail', 'sendnotification'}:
|
|
65110
65152
|
sendNotificationEmail = True
|
|
65111
65153
|
elif myarg == 'emailmessage':
|
|
65112
65154
|
sendNotificationEmail = True
|
|
@@ -65362,7 +65404,7 @@ def doUpdateDriveFileACLs():
|
|
|
65362
65404
|
updateDriveFileACLs([_getAdminEmail()], True)
|
|
65363
65405
|
|
|
65364
65406
|
# gam [<UserTypeEntity>] create permissions <DriveFileEntity> <DriveFilePermissionsEntity> [asadmin]
|
|
65365
|
-
# [expiration <Time>] [
|
|
65407
|
+
# [expiration <Time>] [sendemail|sendnotification] [emailmessage <String>]
|
|
65366
65408
|
# [moveToNewOwnersRoot [<Boolean>]]
|
|
65367
65409
|
# <PermissionMatch>* [<PermissionMatchAction>]
|
|
65368
65410
|
def createDriveFilePermissions(users, useDomainAdminAccess=False):
|
|
@@ -65480,7 +65522,7 @@ def createDriveFilePermissions(users, useDomainAdminAccess=False):
|
|
|
65480
65522
|
moveToNewOwnersRoot = getBoolean()
|
|
65481
65523
|
elif myarg in {'expiration', 'expires'}:
|
|
65482
65524
|
expiration = getTimeOrDeltaFromNow()
|
|
65483
|
-
elif myarg
|
|
65525
|
+
elif myarg in {'sendemail', 'sendnotification'}:
|
|
65484
65526
|
sendNotificationEmail = True
|
|
65485
65527
|
elif myarg == 'emailmessage':
|
|
65486
65528
|
sendNotificationEmail = True
|
gam/gamlib/glclargs.py
CHANGED
|
@@ -1057,6 +1057,7 @@ class GamCLArgs():
|
|
|
1057
1057
|
OB_SPREADSHEET_RANGE_LIST = 'SpreadsheetRangeList'
|
|
1058
1058
|
OB_STATE_NAME_LIST = "StateNameList"
|
|
1059
1059
|
OB_STRING = 'String'
|
|
1060
|
+
OB_STRING_ENTITY = 'StringEntity'
|
|
1060
1061
|
OB_STRING_LIST = 'StringList'
|
|
1061
1062
|
OB_STUDENTGROUP_ID = 'StudentGroupID'
|
|
1062
1063
|
OB_STUDENTGROUP_ID_ENTITY = 'StudentGroupIDEntity'
|
gam/gamlib/glmsgs.py
CHANGED
|
@@ -499,6 +499,7 @@ STATISTICS_MOVE_FILE = 'Total: {0}, Moved: {1}, Shortcut created {2}, Shortcut e
|
|
|
499
499
|
STATISTICS_MOVE_FOLDER = 'Total: {0}, Moved: {1}, Shortcut created {2}, Shortcut exists {3}, Duplicate: {4}, Merged: {5}, Move Failed: {6}, Not writable: {7}'
|
|
500
500
|
STATISTICS_USER_NOT_ORGANIZER = 'User not organizer: {0}'
|
|
501
501
|
STRING_LENGTH = 'string length'
|
|
502
|
+
STUDENT_NOT_IN_COURSE = 'Student not in course'
|
|
502
503
|
SUBKEY_FIELD_MISMATCH = 'subkeyfield {0} does not match saved subkeyfield {1}'
|
|
503
504
|
SUBSCRIPTION_NOT_FOUND = 'Could not find subscription'
|
|
504
505
|
SUFFIX_NOT_ALLOWED_WITH_CUSTOMLANGUAGE = 'Suffix {0} not allowed with customLanguage {1}'
|
gam/gamlib/glskus.py
CHANGED
|
@@ -100,7 +100,7 @@ _SKUS = {
|
|
|
100
100
|
'1010470003': {
|
|
101
101
|
'product': '101047', 'aliases': ['geminibiz'], 'displayName': 'Gemini Business'},
|
|
102
102
|
'1010470004': {
|
|
103
|
-
'product': '101047', 'aliases': ['geminiedu'], 'displayName': '
|
|
103
|
+
'product': '101047', 'aliases': ['gaiproedu', 'geminiedu'], 'displayName': 'Google AI Pro for Education'},
|
|
104
104
|
'1010470005': {
|
|
105
105
|
'product': '101047', 'aliases': ['geminiedupremium'], 'displayName': 'Gemini Education Premium'},
|
|
106
106
|
'1010470006': {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=Dg18uAagGM_Ri_DQ16DbZHZY_PnpNgXH3VH4_nv1KHs,3610487
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=DUsVo2XlFYwfkhe3gnxa-Km4Z4noz74hSApXwTT-nQE,44344
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -25,14 +25,14 @@ gam/gamlib/__init__.py,sha256=z5mF-y0j8pm-YNFBaiuxB4M_GAUPG-cXWwrhYwrVReM,679
|
|
|
25
25
|
gam/gamlib/glaction.py,sha256=1Il_HrChVnPkzZwiZs5au4mFQVtq4K1Z42uIuR6qdnI,9419
|
|
26
26
|
gam/gamlib/glapi.py,sha256=u97M7Y2BeP3tYEEGYEz-9kY4fdV0fYkeqC3YN-sRwNc,36028
|
|
27
27
|
gam/gamlib/glcfg.py,sha256=7Ut-7sDTw-WVHZfvDWn_dlVNfuWd6VsPDBpQ3qnyzJE,28100
|
|
28
|
-
gam/gamlib/glclargs.py,sha256=
|
|
28
|
+
gam/gamlib/glclargs.py,sha256=vDHe3heii7s-VN0xren0CCS5S6c1e5dCLigWTZlyeY8,44170
|
|
29
29
|
gam/gamlib/glentity.py,sha256=8F98YR1ronheiQShD6WHlY-YnBKfMDrc33iRuRoLIvo,35097
|
|
30
30
|
gam/gamlib/glgapi.py,sha256=pdBbwNtnCwFWxJGaP-_3hdTjSNoOCJF2yo76WdQOi1k,40426
|
|
31
31
|
gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
|
|
32
32
|
gam/gamlib/glglobals.py,sha256=oJfaLUQj46XqwrOzRfWhGqO0f1P26xjJZefaILJUFGE,9695
|
|
33
33
|
gam/gamlib/glindent.py,sha256=RfBa2LDfLIqPLL5vMfC689TCVmqn8xf-qulSzkiatrc,1228
|
|
34
|
-
gam/gamlib/glmsgs.py,sha256=
|
|
35
|
-
gam/gamlib/glskus.py,sha256=
|
|
34
|
+
gam/gamlib/glmsgs.py,sha256=ODq-KS3jhXH5DB5DEo6eCX1DHhy4OGv_jeQjiLVPOHM,34049
|
|
35
|
+
gam/gamlib/glskus.py,sha256=29vlBLBJCL4u9GawCt3eNeZq9HQG3hGFZk9-EainNng,15384
|
|
36
36
|
gam/gamlib/gluprop.py,sha256=IyPLCyvn7-NHTUenM71YPQPXRZXx6CB5q-GtJ-FYd1c,11461
|
|
37
37
|
gam/gamlib/glverlibs.py,sha256=xoQXiwcE_-HVYKv-VYA8O0mazRsc9mN-_ysj1dAlMyc,992
|
|
38
38
|
gam/gamlib/yubikey.py,sha256=-UC-3oue9qarYK3LT7YL6Gmqs7TMK8oz9_AoxdaG2FA,7925
|
|
@@ -65,8 +65,8 @@ gam/googleapiclient/discovery_cache/base.py,sha256=yCDPtxnbNN-p5_9fzBacC6P3wcUPl
|
|
|
65
65
|
gam/googleapiclient/discovery_cache/file_cache.py,sha256=sim3Mg4HgRYo3vX75jvcKy_aV568EvIrtBfvfbw-044,4774
|
|
66
66
|
gam/iso8601/__init__.py,sha256=Z2PsYbXgAH5a5xzUvgczCboPzqWpm65kRcIngCnhViU,1218
|
|
67
67
|
gam/iso8601/iso8601.py,sha256=Li2FHZ4sBTWuthuQhyCvmvj0j6At8JbGzkSv2fc2RHU,4384
|
|
68
|
-
gam7-7.20.
|
|
69
|
-
gam7-7.20.
|
|
70
|
-
gam7-7.20.
|
|
71
|
-
gam7-7.20.
|
|
72
|
-
gam7-7.20.
|
|
68
|
+
gam7-7.20.3.dist-info/METADATA,sha256=3rEbZ76pZrP2xa_v6tNKqFzRPGFDpZXuVXcgnkTUqgc,2940
|
|
69
|
+
gam7-7.20.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.20.3.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.20.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.20.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|