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.
151 lines
3.1 KiB
151 lines
3.1 KiB
|
16 years ago
|
<?php
|
||
|
16 years ago
|
/* For licensing terms, see /license.txt */
|
||
|
19 years ago
|
/**
|
||
|
|
* A learnpath
|
||
|
|
* @author Bart Mollet <bart.mollet@hogent.be>
|
||
|
16 years ago
|
* @package chamilo.backup
|
||
|
19 years ago
|
*/
|
||
|
16 years ago
|
class CourseCopyLearnpath extends Resource {
|
||
|
19 years ago
|
/**
|
||
|
|
* Type of learnpath (can be dokeos (1), scorm (2), aicc (3))
|
||
|
|
*/
|
||
|
|
var $lp_type;
|
||
|
19 years ago
|
/**
|
||
|
|
* The name
|
||
|
|
*/
|
||
|
|
var $name;
|
||
|
19 years ago
|
/**
|
||
|
|
* The reference
|
||
|
|
*/
|
||
|
|
var $ref;
|
||
|
19 years ago
|
/**
|
||
|
|
* The description
|
||
|
|
*/
|
||
|
|
var $description;
|
||
|
|
/**
|
||
|
19 years ago
|
* Path to the learning path files
|
||
|
|
*/
|
||
|
|
var $path;
|
||
|
|
/**
|
||
|
|
* Whether additional commits should be forced or not
|
||
|
|
*/
|
||
|
|
var $force_commit;
|
||
|
|
/**
|
||
|
|
* View mode by default ('embedded' or 'fullscreen')
|
||
|
|
*/
|
||
|
|
var $default_view_mod;
|
||
|
|
/**
|
||
|
|
* Default character encoding
|
||
|
|
*/
|
||
|
|
var $default_encoding;
|
||
|
|
/**
|
||
|
|
* Display order
|
||
|
|
*/
|
||
|
|
var $display_order;
|
||
|
|
/**
|
||
|
|
* Content editor/publisher
|
||
|
|
*/
|
||
|
|
var $content_maker;
|
||
|
|
/**
|
||
|
|
* Location of the content (local or remote)
|
||
|
|
*/
|
||
|
|
var $content_local;
|
||
|
|
/**
|
||
|
|
* License of the content
|
||
|
|
*/
|
||
|
|
var $content_license;
|
||
|
|
/**
|
||
|
|
* Whether to prevent reinitialisation or not
|
||
|
|
*/
|
||
|
|
var $prevent_reinit;
|
||
|
|
/**
|
||
|
|
* JavaScript library used
|
||
|
|
*/
|
||
|
|
var $js_lib;
|
||
|
|
/**
|
||
|
|
* Debug level for this lp
|
||
|
|
*/
|
||
|
|
var $debug;
|
||
|
|
/**
|
||
|
|
* The items
|
||
|
|
*/
|
||
|
|
var $items;
|
||
|
|
/**
|
||
|
|
* The learnpath visibility on the homepage
|
||
|
19 years ago
|
*/
|
||
|
|
var $visibility;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Create a new learnpath
|
||
|
19 years ago
|
* @param integer ID
|
||
|
|
* @param integer Type (1,2,3,...)
|
||
|
19 years ago
|
* @param string $name
|
||
|
19 years ago
|
* @param string $path
|
||
|
|
* @param string $ref
|
||
|
19 years ago
|
* @param string $description
|
||
|
19 years ago
|
* @param string $content_local
|
||
|
|
* @param string $default_encoding
|
||
|
|
* @param string $default_view_mode
|
||
|
|
* @param bool $prevent_reinit
|
||
|
|
* @param bool $force_commit
|
||
|
|
* @param string $content_maker
|
||
|
|
* @param integer $display_order
|
||
|
|
* @param string $js_lib
|
||
|
|
* @param string $content_license
|
||
|
|
* @param integer $debug
|
||
|
|
* @param string $visibility
|
||
|
|
* @param array $items
|
||
|
19 years ago
|
*/
|
||
|
19 years ago
|
function Learnpath($id,$type,$name,$path,$ref,$description,$content_local,$default_encoding,$default_view_mode,$prevent_reinit,$force_commit,$content_maker,$display_order,$js_lib,$content_license,$debug,$visibility,$items)
|
||
|
19 years ago
|
{
|
||
|
|
parent::Resource($id,RESOURCE_LEARNPATH);
|
||
|
16 years ago
|
$this->lp_type = $type;
|
||
|
19 years ago
|
$this->name = $name;
|
||
|
19 years ago
|
$this->path = $path;
|
||
|
|
$this->ref = $ref;
|
||
|
19 years ago
|
$this->description = $description;
|
||
|
19 years ago
|
$this->content_local = $content_local;
|
||
|
|
$this->default_encoding = $default_encoding;
|
||
|
|
$this->default_view_mod = $default_view_mode;
|
||
|
|
$this->prevent_reinit = $prevent_reinit;
|
||
|
|
$this->force_commit = $force_commit;
|
||
|
|
$this->content_maker = $content_maker;
|
||
|
|
$this->display_order = $display_order;
|
||
|
|
$this->js_lib = $js_lib;
|
||
|
|
$this->content_license = $content_license;
|
||
|
|
$this->debug = $debug;
|
||
|
19 years ago
|
$this->visibility=$visibility;
|
||
|
19 years ago
|
$this->items = $items;
|
||
|
19 years ago
|
}
|
||
|
|
/**
|
||
|
19 years ago
|
* Get the items
|
||
|
19 years ago
|
*/
|
||
|
19 years ago
|
function get_items()
|
||
|
19 years ago
|
{
|
||
|
19 years ago
|
return $this->items;
|
||
|
19 years ago
|
}
|
||
|
|
/**
|
||
|
|
* Check if a given resource is used as an item in this chapter
|
||
|
|
*/
|
||
|
|
function has_item($resource)
|
||
|
|
{
|
||
|
19 years ago
|
foreach($this->items as $index => $item)
|
||
|
19 years ago
|
{
|
||
|
19 years ago
|
if( $item['id'] == $resource->get_id() && $item['type'] == $resource->get_type())
|
||
|
19 years ago
|
{
|
||
|
19 years ago
|
return true;
|
||
|
19 years ago
|
}
|
||
|
|
}
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
/**
|
||
|
|
* Show this learnpath
|
||
|
|
*/
|
||
|
|
function show()
|
||
|
|
{
|
||
|
|
parent::show();
|
||
|
|
echo $this->name;
|
||
|
|
}
|
||
|
|
}
|
||
|
16 years ago
|
?>
|