Skip to content

Commit 6ac0066

Browse files
committed
Fix types and display issues
1 parent c58530a commit 6ac0066

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ Below are the tables:
371371
| ------------------------------ | ------------------------------------------------------------ |
372372
| auth_user | Django built-in user table which contains users' authentication information: username, email, password... |
373373
| user_roles | Contains users' roles. Three roles are used in this sample: admin, teacher, and student. |
374-
| profiles | Contains users' extra information: *favoriteColor*, *organization_id*, *o365UserId*, and *o365Email*. The later two are used to connect the local user with an O365 user. |
374+
| profiles | Contains users' extra information: *favoriteColor*, *organization_id*, *o365UserId*, and *o365Email*. The latter two are used to connect the local user with an O365 user. |
375375
| organizations | A row in this table represents a tenant in AAD.<br>*isAdminConsented* column records if the tenant consented by an administrator. |
376376
| token_cache | Contains the users' access/refresh tokens. |
377377
| classroom_seating_arrangements | Contains the classroom seating arrangements data. |
@@ -449,28 +449,28 @@ The **EducationServiceClient** is the core class of the library. It is used to e
449449

450450
**Get schools**
451451

452-
~~~typescript
452+
~~~python
453453
def get_schools(self):
454454
url = self.api_base_uri + 'education/schools'
455455
return self.rest_api_service.get_object_list(url, self.access_token, model=School)
456456
~~~
457457

458-
~~~typescript
458+
~~~python
459459
def get_school(self, object_id):
460460
url = self.api_base_uri + 'education/schools/%s' % school_id
461461
return self.rest_api_service.get_object(url, self.access_token, model=School)
462462
~~~
463463

464464
**Get classes**
465465

466-
~~~typescript
466+
~~~python
467467
def get_classes(self, school_id, top=12, nextlink=''):
468468
skiptoken = self._get_skip_token(nextlink)
469469
url = self.api_base_uri + "education/schools/%s/classes?$expand=schools&$top=%s&skiptoken=%s" % (school_id, top, skiptoken)
470470
return self.rest_api_service.get_object_list(url, self.access_token, model=Section, next_key='odata.nextLink')
471471
~~~
472472

473-
```typescript
473+
```python
474474
def get_class(self, class_id):
475475
'''
476476
Get a section by using the object_id.
@@ -481,20 +481,22 @@ def get_classes(self, school_id, top=12, nextlink=''):
481481
```
482482
**Manage Assignments**
483483

484-
def get_assignments(self,class_id):
485-
'''
486-
Get assignments of a class.
487-
'''
488-
url = self.api_base_uri + 'education/classes/' +class_id + "/assignments"
489-
return self.rest_api_service.get_object_list(url, self.access_token, model=Assignment)
484+
```python
485+
def get_assignments(self,class_id):
486+
'''
487+
Get assignments of a class.
488+
'''
489+
url = self.api_base_uri + 'education/classes/' +class_id + "/assignments"
490+
return self.rest_api_service.get_object_list(url, self.access_token, model=Assignment)
490491
```
492+
```python
491493
def add_assignment(self,class_id,name,dueDateTime):
492494
url = self.api_base_uri + 'education/classes/' +class_id + "/assignments"
493495
data={"displayName":name,"status":"draft","dueDateTime":dueDateTime,"allowStudentsToAddResourcesToSubmission":"true","assignTo":{"@odata.type":"#microsoft.graph.educationAssignmentClassRecipient"}}
494496
return self.rest_api_service.post_json(url,self.access_token,None,data)
495497
```
496498

497-
```
499+
```python
498500
def get_Assignment_Resources(self,class_id,assignment_id):
499501
url = self.api_base_uri + "education/classes/"+class_id+"/assignments/"+assignment_id+"/resources";
500502
return self.rest_api_service.get_object_list(url, self.access_token, model=AssignmentResource)

0 commit comments

Comments
 (0)