You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.1 KiB
59 lines
2.1 KiB
15 years ago
|
<?php
|
||
|
/* For licensing terms, see /license.txt */
|
||
14 years ago
|
|
||
10 years ago
|
require_once 'learnpathItem.class.php';
|
||
|
|
||
15 years ago
|
/**
|
||
10 years ago
|
* Class aiccObjective
|
||
10 years ago
|
* Class defining the Block elements in an AICC Course Structure file.
|
||
15 years ago
|
* Container for the aiccResource class that deals with elemens from AICC Objectives file
|
||
15 years ago
|
* @package chamilo.learnpath
|
||
15 years ago
|
* @author Yannick Warnier <ywarnier@beeznest.org>
|
||
15 years ago
|
* @license GNU/GPL
|
||
15 years ago
|
*/
|
||
10 years ago
|
class aiccObjective extends learnpathItem
|
||
|
{
|
||
14 years ago
|
public $identifier = '';
|
||
|
public $members = array();
|
||
15 years ago
|
|
||
14 years ago
|
/**
|
||
|
* Class constructor. Depending of the type of construction called ('db' or 'manifest'), will create a scormResource
|
||
|
* object from database records or from the array given as second param
|
||
|
* @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
|
||
|
*/
|
||
10 years ago
|
function aiccObjective($type = 'config', $params)
|
||
|
{
|
||
14 years ago
|
if (isset($params)) {
|
||
|
switch ($type) {
|
||
|
case 'db':
|
||
|
// TODO: Implement this way of object creation.
|
||
|
return false;
|
||
|
case 'config': // Do the same as the default.
|
||
|
default:
|
||
10 years ago
|
foreach ($params as $a => $value) {
|
||
|
switch ($a) {
|
||
|
case 'system_id':
|
||
|
$this->identifier = strtolower($value);
|
||
|
break;
|
||
|
case 'member':
|
||
|
if (strstr($value, ',') !== false) {
|
||
10 years ago
|
$temp = explode(',', $value);
|
||
10 years ago
|
foreach ($temp as $val) {
|
||
|
if (!empty($val)) {
|
||
|
$this->members[] = $val;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
10 years ago
|
|
||
14 years ago
|
return true;
|
||
|
}
|
||
|
}
|
||
10 years ago
|
|
||
14 years ago
|
return false;
|
||
10 years ago
|
}
|
||
15 years ago
|
}
|