dokeos-learnpath
[ class tree: dokeos-learnpath ] [ index: dokeos-learnpath ] [ all elements ]

Procedural File: lp_comm.server.php

Source Location: /main/newscorm/lp_comm.server.php



Page Details:

This script contains the server part of the xajax interaction process. The client part is located in lp_api.php or other api's.

This is a first attempt at using xajax and AJAX in general, so the code might be a bit unsettling.




Tags:

author:  Yannick Warnier <ywarnier@beeznest.org>
filesource:  Source Code for this file


Includes:

require('lp_comm.common.php') [line 449]
require_once('back_compat.inc.php') [line 16]
Script







backup_item_details [line 31]

void backup_item_details( integer $lp_id, integer $user_id, integer $view_id, integer $item_id, [double $score = -1], [double $max = -1], [double $min = -1], [string $status = ''], [string $time = ''], [string $suspend = ''], [string $location = ''])

Backup an item's values into the javascript API as "old" values (so we still have them at hand)



Parameters

integer   $lp_id   Learnpath ID
integer   $user_id   User ID
integer   $view_id   View ID
integer   $item_id   Item ID
double   $score   Current score
double   $max   Maximum score
double   $min   Minimum score
string   $status   Lesson status
string   $time   Session time
string   $suspend   Suspend data
string   $location   Lesson location
[ Top ]



save_item [line 61]

void save_item( integer $lp_id, integer $user_id, integer $view_id, integer $item_id, [double $score = -1], [double $max = -1], [double $min = -1], [string $status = ''], [string $time = 0], [string $suspend = ''], [string $location = ''], [string $interactions = array()], [ $core_exit = 'none'])

Writes an item's new values into the database and returns the operation result



Parameters

integer   $lp_id   Learnpath ID
integer   $user_id   User ID
integer   $view_id   View ID
integer   $item_id   Item ID
double   $score   Current score
double   $max   Maximum score
double   $min   Minimum score
string   $status   Lesson status
string   $time   Session time
string   $suspend   Suspend data
string   $location   Lesson location
string   $interactions   Core exit SCORM string
   $core_exit  
[ Top ]



save_objectives [line 200]

void save_objectives( integer $lp_id, integer $user_id, integer $view_id, integer $item_id, [array $objectives = array()])

Writes an item's new values into the database and returns the operation result



Parameters

integer   $lp_id   Learnpath ID
integer   $user_id   User ID
integer   $view_id   View ID
integer   $item_id   Item ID
array   $objectives   Objectives array
[ Top ]



start_timer [line 441]

void start_timer( )

Start a timer and hand it back to the JS by assigning the current time (of start) to

var asset_timer




[ Top ]



switch_item_details [line 247]

void switch_item_details( integer $lp_id, integer $user_id, integer $view_id, integer $current_item, integer $next_item)

Get one item's details



Parameters

integer   $lp_id   LP ID
integer   $user_id   user ID
integer   $view_id   View ID
integer   $current_item   Current item ID
integer   $next_item   New item ID
[ Top ]



Documentation generated on Thu, 12 Jun 2008 14:01:47 -0500 by phpDocumentor 1.4.1