Edit course
To edit the course, SID, safekey, timeStamp, course ID, new folder ID, new course name, expiration time, class teacher account, whether to add to the list of teachers, course cover picture, course introduction, classroom setting ID (mainly used to set the classroom skin and other options), forbidden words, class teacher UID;Where SID, safekey, timeStamp, courseId are required, the other parameters need to be modified to pass that.Returns the instructions after execution.Note: after editing the course resources, all the lecture resources that are not started will be modified to the edited course resources.
URL
https://api.eeo.cn/partner/api/course.api.php?action=editCourse
HTTP Request Methods
- POST
Coding format
- UTF-8
Request Data
Key | Required | More Restrictions | Instructions | Description |
---|---|---|---|---|
SID | Yes | Null | School ID | It is available through the eeo.cn application |
safeKey | Yes | Fixed 32-bit all lowercase characters | School authentication security key | safeKey=MD5(SECRET+timeStamp) |
timeStamp | Yes | Null | Timestamp used by safeKey | Unix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970 |
courseId | Yes | Null | Course ID | Null |
folderId | No | Null | New resource folder ID | Null |
courseName | No | Null | New course name | Null |
expiryTime | No | Expired time passes empty, does not modify;Pass 0, change to never expire;If the timestamp is not 0, the validity period is the time passed.If an expiry date is set, the expiry date can only be passed within 1 year of the current time | Expiration time | There is no |
stamp | No | 1 join,2 not to join,the default is 1 | The original head teacher whether to join the teacher list | Null |
Filedata | No | Binary stream | Upload a picture of the course cover | Null |
courseIntroduce | No | 0-400 characters, more than 400 will automatically intercept 400 words | Course introduction | Null Remark:The first four parameters are required,The rest of the optional,Change which parameter to pass which parameter,Parameters that are not modified are not transmitted,If mainTeacherAccount is passed and stamp is not passed, the default original head teacher joins the teacher list. |
classroomSettingId | No | Default is 0 | Classroom setting ID | Classroom setting ID search method: log into the background of eeo.cn, find the institutional setting and classroom setting, and the classroom setting ID will be displayed for each set of classroom Settings;After selecting this set of Settings, all classrooms under the course will be displayed according to this setting. Classroom Settings include: a. classroom skin, b. switch Settings (toolbar below the head, chat window, student-side roster, after-class evaluation, classroom toolbox, cloud disk, etc.), c. parameter Settings (class countdown, classroom chat interval, etc.) |
mainTeacherUid | No | if no parameter passed it means no changes. | The teacher in charge the UID | Register the user UID returned by the user interface |
Response data
key | Type | Sample value | meaning |
---|---|---|---|
error_info | object | Return message object | |
└ errno | number | 1 | Error code |
└ error | string | "Program normal execution" | Error list |
Sample
- HTTP request
POST /partner/api/course.api.php?action=editCourse HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
SID=2339736&safeKey=f834fff59eb3bc8a2ff26a3cb59155f0&timeStamp=1492792399&courseId=352861&folderId=22419&courseName=Today+is+a+good+day&expiryTime=&mainTeacherUid=1001001&Filedata=@~/photo.jpg&courseIntroduce=ClassIn,真正专业的在线教室&classroomSettingId=235
- Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
-d "SID=1234567" \
-d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \
-d "timeStamp=1484719085" \
-d "courseId=352861" \
-d "folderId=22419" \
-d "courseName=Today is a good day" \
-d "expiryTime=1484811085" \
-d "mainTeacherUid=1001001" \
-d "stamp=2" \
-d "Filedata=@~/photo.jpg" \
-d "courseIntroduce=ClassIn,真正专业的在线教室" \
-d "classroomSettingId=235" \
"https://api.eeo.cn/partner/api/course.api.php?action=editCourse"
Response sample(The normal return json
packet example)
{
"error_info": {
"errno": 1,
"error": "程序正常执行"
}
}
Error code instruction
Error code | instruction |
---|---|
1 | Expression successful execution. |
100 | Expression parameter not all or error. |
102 | Expression dont have permissions(Security verification failed). |
103 | Expression Failed to put the image in the server. |
104 | Expression operation failure(Unknown error). |
114 | Expression server exception. |
139 | Expression there is a class section for the course(Can't edit course information). |
144 | Expression there is no such course under the agency. |
147 | Expression no such course information. |
149 | Expression the course has been deleted. |
151 | Expression the expiration date will take at least 1 day. |
152 | Expression the expiration time cannot be less than the end of the last class. |
153 | Expression the course has expired. |
154 | Expression the expiration time can only be within one year. |
160 | Expression there is no cloud disk directory under the school. |
260 | Expression added the head teacher failed. |
310 | Expression the new head teacher does not exist. |
311 | Expression the students under the course cannot be added as head teachers. |
312 | Expression the attend under the course cannot be added as head teachers. |
314 | Expression the director of the original class has not finished the class day, cannot change. |
331 | Expression the head teacher's account format is not correct. |
334 | Expression the head teacher is not the teacher of this school. |
369 | Expression open class does not support this operation. |
371 | Indicates that the classroom setting does not exist |
373 | Indicates that the classroom setting is not part of the institution |
389 | expression The head teacher has been suspended |
400 | Indicates that the request data is not valid |
805 | The head teacher is suspended |