Documentation
1 Login
Description
Login on the server
Request
POST http://domain.org/login_handler
with parameters:
login: your username
password: your password
2 Logout
Description
Logout from the server
Request
GET http://domain.org/logout
3 Get all scorm packages
Description
Get a list of all scorm packages present in the db
Request
GET http://domain.org/scorms
Response
{id_scorm:
{'root_page': uri_to_root_page,
'uri': None,
'title': title_of_this_scorm_package}
}
4 Get Table of contents (TOC)
Description
Get TOC for scorm package with id id_scorm
Request
GET http://domain.org/scorms/{id_scorm}
Response
{id_item:
{'title': title_for_this_item,
'sequence': item_sequence_as_described_into_manifest}
}
5 Get resources connected to one item
Description
Get all resources connected to this item
Request
GET http://domain.org/items/{id_item}
Response
{id_resource:
{'type': resource_type, //e.g.: css/video/html/sync
'uri': uri_to_this_resource}
}
6 Get the number of slides
Description
Get total number of slides for item id_item
Request
GET http://domain.org/slides/{id_item}
Response
{id_item:
{'tot_slides': number of slides}
}
7 Get one slide
Description
Get sequence_number-th slide for item id_item
Request
GET http://domain.org/slides/{id_item}/{sequence_number}
{sequence_number} in [0, n-1], with n the number of total slides
Response
{id_slide:
{"slide_content": html_content_of_this_slide,
"video_uri": uri_for_video_connected_to_this_slide,
"video_start": start_time,
"video_end": end_time //video start and end time connected to this slide
"tot_slides": total_number_of_slides,
}
}
8 Get the list of video-slide timing
Description
Get video timing for each slide (get the information in the "sync" file in json format) for item id_item
Request
GET http://domain.org/sync/{id_item}
Response
{id_slide:
{"video_start": start_time,
"video_end": end_time,
"video_uri": total_number_of_slides,
"sequence": slide_sequence_number}
}
9 Get lesson (item) outline
Description
Get the outline for item id_item
Request
GET http://domain.org/outline/{id_item}
Response
{id_slide:
{"sequence": slide_sequence_number,
"title": slide_title}
}
10 Get comments
Description
Get comments from SCORM object, Lecture and Slide
Request
GET http://domain.org/comments/{type}/{id_type}
type
- scorm : point to the {id_type} scorm object
- item : point to the {id_type} lesson
- slide : point to the {id_type} slide
Response
{id_comment:
{"date": when_wrote_comments,
"user_name": who_wrote_comments,
"value": what_about}
}
11 Post comments
Description
Write comments to SCORM Object, Lecture and Slide
Request
POST http://domain.org/comment/{type}/{id_type}
with parameter:
enrichment:value;
type
- scorm : point to the {id_type} scorm object
- item : point to the {id_type} lesson
- slide : point to the {id_type} slide
Please note
To avoid cross-domain problem, it works **only** if the call is in a SCORM Object already in the server. Only for a **test** step, you can perform post comments here.
AJAX call
$(function(){
$.ajax({
type: "POST",
url: "/comment/{type}/{id_type}",
data: "enrichment=...",
success: function(msg){
alert( "Msg: " + msg );
}
});
});