Source for file linkfactory.class.php
Documentation is available at linkfactory.class.php
// To add your new link type here:
// - define a unique type id
// - change create() and get_all_types()
// Please do not change existing values, they are used in the database !
define('LINK_STUDENTPUBLICATION',3);
include_once('abstractlink.class.php');
include_once('exerciselink.class.php');
include_once('evallink.class.php');
include_once('dropboxlink.class.php');
include_once('studentpublicationlink.class.php');
include_once('learnpathlink.class.php');
* Factory for link objects
* @package dokeos.gradebook
* Retrieve links and return them as an array of extensions of AbstractLink.
* @param $ref_id reference id
* @param $user_id user id (link owner)
* @param $course_code course code
* @param $category_id parent category
* @param $visible visible
public function load ($id = null, $type = null, $ref_id = null, $user_id = null, $course_code = null, $category_id = null, $visible = null)
return AbstractLink::load($id, $type, $ref_id, $user_id, $course_code, $category_id, $visible);
* Get the link object referring to an evaluation
foreach ($links as $link)
if (is_a($link, 'EvalLink'))
* @param string $name_mask search string
* @return array link objects matching the search criterium
public function find_links ($name_mask,$selectcat)
* Static method to create specific link objects
public function create ($type)
* Return an array of all known link types
|