Add LMS Activity Members
This is a general interface used to add members to an LMS activity.
Note
- By default, all class members can participate the activities when created, so there is no need to call this interface separately.
- For activities other than classroom activities, the selectable participants include students and auditors from the same class.
- The participants for classroom activities are currently limited to students from the class. Future plans will support transfer students (those not in the class), and this interface can also be used to add the transfer students.
- Each member added will have a separate return code, which will be included in the
data
.
- If a member already exists in the activity, no error code will be returned; instead, it will return 1, indicating normal execution.
URL
https://root_url/lms/activity/addStudent
HTTP Request Methods
Request Data
Key |
Required |
Type |
Description |
X-EEO-SIGN |
Yes |
string |
Signature; see the rules here |
X-EEO-UID |
Yes |
string |
Institution's SID |
X-EEO-TS |
Yes |
string |
Timestamp |
Body Parameters
Key |
Required |
Type |
Description |
Rules Description |
courseId |
Yes |
integer |
Course ID |
|
activityId |
Yes |
integer |
Activity ID returned after creation |
|
studentUids |
Yes |
array[string] |
Array of student UIDs |
Response Data
Parameter Name |
Type |
Example Value |
Meaning |
code |
integer |
1 |
Error code |
msg |
string |
"Execution successful" |
Error message |
data |
array[integer] |
null |
Response data |
└ studentUid |
integer |
|
Response data |
└ code |
integer |
1 |
Response data |
└ msg |
string |
"Execution successful" |
Response data |
Example
POST /lms/activity/addStudent HTTP/1.1
root_url
ceb7a2c0534999960c02c191d409c41e
409864
1722938382
application/json
117
{
"courseId": 414193,
"activityId": 25096097,
"studentUids": [
504026,
504028
]
}
- Shell cURL analog request instruction
curl -X POST \
-H 'Host: root_url' \
-H 'X-EEO-SIGN: ceb7a2c0534999960c02c191d409c41e' \
-H 'X-EEO-UID: 409864' \
-H 'X-EEO-TS: 1722938382' \
-H 'Content-Type: application/json' \
-d '{"courseId": 414193, "activityId": 25096097, "studentUids": [504026, 504028]}' \
'https://root_url/lms/activity/addStudent'
Response sample(The normal return json packet example)
{
"code": 1,
"msg": "Execution successful",
"data": [
{
"studentUid": 504026,
"code": 40030,
"msg": "Student not in the class"
},
{
"studentUid": 504028,
"code": 1,
"msg": "Execution successful"
}
]
}
Error Code Descriptions
Error Code |
Description |
147 |
No information about this course |
29149 |
Activity has been deleted |
30002 |
Activity does not exist |
40030 |
Student not in the class |
101002005 |
Signature exception |
101002006 |
Timestamp expired |
101002008 |
Timestamp does not exist |
110100069 |
Activity has ended |
110100070 |
Activity type error (Assignment, Test not supported) |
121601020 |
Parameter error |
121601021 |
This class does not belong to your institution |
121601022 |
It is not a standard class |
121601023 |
This class has been dissolved and cannot be operated |
121601030 |
Missing required parameters |