training.module

Manage an individual training module

SUPPORTED METHODS:

GET

ParametersTypeDescription
token (required)Valid token
id (required)integerModule id
store (accepted)integerStore id

UPDATE

ParametersTypeDecription
token (required)Valid token
id (required)integerModule id
title (accepted)varcharModule Title
duedate (accepted)dateDue date
est_time (accepted)dateEstimation time
section (accepted)integerSection
child_edit (accepted)integerChild edit
tutorial (accepted)integerTutorial
mintime (accepted)integerMintime
contents (accepted)varcharContents
video (accepted)varcharVideo - Youtube id
addgroup (accepted)integerAdd group by id
removegroup (accepted)integerRemove group by id
add_group (accepted)integerAdd group by id
remove_group (accepted)integerRemove group by id
add_skill (accepted)integerAdd skill by id
remove_skill (accepted)integerRemove skill by id
add_user_training (accepted)integerAdd user training by id
iframe (accepted)varcharIframe
remove_user_training (accepted)integerRemove user training by id
addlocation (accepted)integerAdd location by id
removelocation (accepted)integerRemove location by id
reset (accepted)integerReset

null : Do nothing
isset: Reset
silent (accepted)integerSilent

null : Do nothing
isset: Silent
comment_type (accepted)integerComment type
can_see_comment (accepted)integerUser can see comments
digital_signature (accepted)integerDigital signiture
download_pdf (accepted)integerDownload pdf
questions (accepted)enum (Array)Questions

DELETE

ParametersTypeDescription
token (required)Valid token
id (required)integerModule id

CREATE

ParametersTypeDescription
token (required)Valid token
title (required)varcharTitle
section (accepted)integerSection
tutorial (accepted)integerTutorial
mintime (accepted)integerMintime
contents (accepted)varcharContents
video (accepted)varcharVideo - Youtube id
iframe (accepted)varcharIframe

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"
}