mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-05 05:11:35 +00:00
accept teacher or owner for course owner
This commit is contained in:
@@ -1565,8 +1565,8 @@ def doUpdateCourse():
|
|||||||
elif myarg in [u'state', u'status']:
|
elif myarg in [u'state', u'status']:
|
||||||
getCourseState(croom, sys.argv[i+1], body)
|
getCourseState(croom, sys.argv[i+1], body)
|
||||||
i += 2
|
i += 2
|
||||||
elif myarg in ['owner']:
|
elif myarg in ['owner', 'ownerid', u'teacher']:
|
||||||
body['ownerId'] = sys.argv[i+1]
|
body['ownerId'] = normalizeEmailAddressOrUID(sys.argv[i+1])
|
||||||
i += 2
|
i += 2
|
||||||
else:
|
else:
|
||||||
print u'ERROR: %s is not a valid argument to "gam update course"' % sys.argv[i]
|
print u'ERROR: %s is not a valid argument to "gam update course"' % sys.argv[i]
|
||||||
@@ -2250,8 +2250,8 @@ def doCreateCourse():
|
|||||||
elif myarg == u'room':
|
elif myarg == u'room':
|
||||||
body[u'room'] = sys.argv[i+1]
|
body[u'room'] = sys.argv[i+1]
|
||||||
i += 2
|
i += 2
|
||||||
elif myarg == u'teacher':
|
elif myarg in [u'teacher', u'owner']:
|
||||||
body[u'ownerId'] = sys.argv[i+1]
|
body[u'ownerId'] = normalizeEmailAddressOrUID(sys.argv[i+1])
|
||||||
i += 2
|
i += 2
|
||||||
elif myarg in [u'state', u'status']:
|
elif myarg in [u'state', u'status']:
|
||||||
getCourseState(croom, sys.argv[i+1], body)
|
getCourseState(croom, sys.argv[i+1], body)
|
||||||
|
|||||||
Reference in New Issue
Block a user