Manage an individual training module
SUPPORTED METHODS:
GET
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
id (required) | integer | Module id |
store (accepted) | integer | Store id |
UPDATE
Parameters | Type | Decription |
---|---|---|
token (required) | Valid token | |
id (required) | integer | Module id |
title (accepted) | varchar | Module Title |
duedate (accepted) | date | Due date |
est_time (accepted) | date | Estimation time |
section (accepted) | integer | Section |
child_edit (accepted) | integer | Child edit |
tutorial (accepted) | integer | Tutorial |
mintime (accepted) | integer | Mintime |
contents (accepted) | varchar | Contents |
video (accepted) | varchar | Video - Youtube id |
addgroup (accepted) | integer | Add group by id |
removegroup (accepted) | integer | Remove group by id |
add_group (accepted) | integer | Add group by id |
remove_group (accepted) | integer | Remove group by id |
add_skill (accepted) | integer | Add skill by id |
remove_skill (accepted) | integer | Remove skill by id |
add_user_training (accepted) | integer | Add user training by id |
iframe (accepted) | varchar | Iframe |
remove_user_training (accepted) | integer | Remove user training by id |
addlocation (accepted) | integer | Add location by id |
removelocation (accepted) | integer | Remove location by id |
reset (accepted) | integer | Reset null : Do nothing isset: Reset |
silent (accepted) | integer | Silent null : Do nothing isset: Silent |
comment_type (accepted) | integer | Comment type |
can_see_comment (accepted) | integer | User can see comments |
digital_signature (accepted) | integer | Digital signiture |
download_pdf (accepted) | integer | Download pdf |
questions (accepted) | enum (Array) | Questions |
DELETE
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
id (required) | integer | Module id |
CREATE
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
title (required) | varchar | Title |
section (accepted) | integer | Section |
tutorial (accepted) | integer | Tutorial |
mintime (accepted) | integer | Mintime |
contents (accepted) | varchar | Contents |
video (accepted) | varchar | Video - Youtube id |
iframe (accepted) | varchar | Iframe |
DOCUMENTATION
GET
Retrieves an individual training module.
Level 5 is required (all users can fetch this module)
--
Example Request:
{
"method":"GET",
"module":"training.module",
"request":{
"id":"36"
}
}
Example Response:
{
"status":1,
"data":{
"id":"24",
"store":"11",
"title":"Admin Account Settings",
"section":"7",
"tutorial":"56",
"contents":"",
"video":"",
"mintime":null,
"deleted":"0",
"deleted_by":"0",
"created":"1334809797",
"created_by":"123",
"updated":"1334810273",
"updated_by":"2",
"child_edit":"1",
"orig_cm_id":"0",
"files":[
],
"stats":{
"totalstaff":0,
"finished":0,
"unfinished":0,
"outdated":0
}
},
"token":"xxxxxxx"
}
UPDATE
Update an individual training module.
Level 3 is required.
--
Example Request:
{
"method":"UPDATE",
"module":"training.module",
"request":{
"id":"56",
"title":"New Title 2",
"content":"New content 2"
}
}
Example Response:
{
"status":1,
"data":{
"id":"56",
"store":"11",
"title":"New title 2",
"section":"7",
"tutorial":"56",
"contents":"New content 2",
"video":"",
"mintime":null,
"deleted":"0",
"deleted_by":"0",
"created":"1334809797",
"created_by":"123",
"updated":"1334810273",
"updated_by":"2",
"child_edit":"1",
"orig_cm_id":"0",
"files":[
],
"stats":{
"totalstaff":0,
"finished":0,
"unfinished":0,
"outdated":0
}
},
"token":"xxxxxxx"
}
DELETE
Delete an individual training module.
Level 3 is required.
--
Example Request:
{
"method":"DELETE",
"module":"training.module",
"request":{
"id":"36"
}
}
Example Response:
{
"status":1,
"data":"",
"token":"xxxxxxx"
}
CREATE
Create an individual training module.
Level 3 is required.
--
Example Request:
{
"method":"CREATE",
"module":"training.module",
"request":{
"title":"New Title",
"content":"New content"
}
}
Example Response:
{
"status":1,
"data":{
"id":"56",
"store":"11",
"title":"New title",
"section":"7",
"tutorial":"56",
"contents":"New content",
"video":"",
"mintime":null,
"deleted":"0",
"deleted_by":"0",
"created":"1334809797",
"created_by":"123",
"updated":"1334810273",
"updated_by":"2",
"child_edit":"1",
"orig_cm_id":"0",
"files":[
],
"stats":{
"totalstaff":0,
"finished":0,
"unfinished":0,
"outdated":0
}
},
"token":"xxxxxxx"
}