Source for file aiccItem.class.php
Documentation is available at aiccItem.class.php
* Container for the aiccItem class that deals with AICC Assignable Units (AUs)
* @package dokeos.learnpath
* @author Yannick Warnier <ywarnier@beeznest.org>
* @license GNU/GPL - See Dokeos license directory for details
* This class handles the elements from an AICC Descriptor file.
require_once('learnpathItem.class.php');
var $title = ''; //no AICC equivalent
//var $prerequisites = ''; - defined in learnpathItem.class.php
//var $max_score = ''; //defined in learnpathItem
//var $path = ''; //defined in learnpathItem
* Class constructor. Depending of the type of construction called ('db' or 'manifest'), will create a scormItem
* object from database records or from the array given as second parameter
* @param string Type of construction needed ('db' or 'config', default = 'config')
* @param mixed Depending on the type given, DB id for the lp_item or parameters array
function aiccItem($type= 'config',$params) {
$this->aicc_contact = false;
//TODO implement this way of metadata object creation
case 'config': //do the same as the default
//if($first_item->type == XML_ELEMENT_NODE) this is already check prior to the call to this function
foreach($params as $a => $value)
case 'time_limit_action':
* Builds a flat list with the current item and calls itself recursively on all children
* @param array Reference to the array to complete with the current item
* @param integer Optional absolute order (pointer) of the item in this learning path
* @param integer Optional relative order of the item at this level
* @param integer Optional level. If not given, assumes it's level 0
$oSubitem->get_flat_list($list,$abs_order,$i,$level+ 1);
* Save function. Uses the parent save function and adds a layer for AICC.
* @param boolean Save from URL params (1) or from object attributes (0)
function save($from_outside= true, $prereqs_complete= false)
parent::save($from_outside, $prereqs_complete= false);
//under certain conditions, the scorm_contact should not be set, because no scorm signal was sent
$this->aicc_contact = true;
if(!$this->aicc_contact){
//error_log('New LP - was expecting SCORM message but none received',0);
|