Change page order
Method
| Method |
Description |
| course.pageChangeOrder |
Change learning page order. |
Request parameters
{
"id": {PageId},
"course_id": {CourseId},
"direction": {Direction},
"position": {Position}
}
Response parameters
{
"completed": {Comleted},
"order": {Order}
}
Please provide exactly one of direction or position. Supplying both, or neither, results in an error.
| Variable |
Type |
Appearance |
Description |
| {PageId} |
Integer |
Mandatory |
Page id. |
| {CourseId} |
Integer |
Mandatory |
Course id. |
| {Direction} |
Integer |
Optional |
Moves the page by one step relative to its current position, swapping places with the neighboring page. Provide this OR {Position}, not both.
- -1 - Move the page up (towards the beginning).
- 1 - Move the page down (towards the end).
|
| {Position} |
Integer |
Optional |
Moves the page to the given 1-based position within the course. Every page between the page's old and new position is shifted by one slot to make room; all other pages keep their position. Provide this OR {Direction}, not both.
Valid range is 1 to the total number of pages in the course.
|
| {Order} |
Integer |
Mandatory |
New order value of the moved page. Only present when {Completed} is true. |
| {Completed} |
Boolean |
Mandatory |
Indicates whether action was successfully completed or not. |