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

Procedural File: resourcelinker.inc.php

Source Location: /main/resourcelinker/resourcelinker.inc.php



Page Details:



Tags:

author:  Roan Embrechts - refactoring to improve code organisation
author:  Patrick Cool - original version
author:  Denes Nagy - further improvements for learning path builder
todo:  use the constants for the tools
todo:  use Database API instead of creating table names locally.


Includes:

include(api_get_path(SYS_CODE_PATH).'lang/'.$_course['language'].'/resourcelinker.inc.php') [line 46]
include(api_get_path(SYS_CODE_PATH).'lang/english/resourcelinker.inc.php') [line 45]


Tags:

author:  Roan Embrechts - refactoring to improve code organisation
author:  Patrick Cool - original version
author:  Denes Nagy - further improvements for learning path builder
todo:  use the constants for the tools
todo:  use Database API instead of creating table names locally.
include('../exercice/hotpotatoes.lib.php') [line 48]
include_once(fileDisplay.lib.php) [line 47]






check_added_resources [line 1481]

void check_added_resources( $type, $id)

this function checks wether there are added resources or not



Parameters

   $type  
   $id  
[ Top ]



delete_added_resource [line 1455]

void delete_added_resource( $type, $id)

this function is to delete the resources that were added to a specific item



Parameters

   $type  
   $id  
[ Top ]



delete_all_resources_type [line 1468]

void delete_all_resources_type( $type)

this function is te delete all resources of a specific type (only used in announcements -- delete all)

Author : Frederik Vermeire <frederik.vermeire@pandora.be>




Parameters

   $type  
[ Top ]



delete_one_added_resource [line 1442]

void delete_one_added_resource( $source_type, $source_id, $resource_type, $resource_id)

this function is to delete ONE specific resource that were added to a specific item



Parameters

   $source_type  
   $source_id  
   $resource_type  
   $resource_id  
[ Top ]



display_addedresource_link [line 265]

void display_addedresource_link( $type $type, $id $id, [$style $style = ''])

Displays the link that opens a new browser window that views the added resource.



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
todo:  use the constants for the type definitions.


Parameters

$type   $type   the type of the tool
$id   $id   the id of the resource
$style   $style   this is used to style the link (for instance when a resource is hidden => the added resources should also be styled like they are hidden)
[ Top ]



display_addedresource_link_in_learnpath [line 364]

void display_addedresource_link_in_learnpath( completed $type, id_in_path $id, id $completed, type $id_in_path, builder $builder, icon $icon, [ $level = 0])

This function is to display the added resources (lessons) in the learning path player and builder

this function is a modification of display_addedresource_link($type, $id) function the two ids are a bit confusing, I admit, but I did not want to change Patrick's work, I was building upon it. - Denes

Parameters:




Tags:

todo:  this function is too long, rewrite


Parameters

completed   $type   - if ="completed" then green presentation with checkbox
id_in_path   $id   - if onclick then this lesson will be considered completed, that is the unique index in the items table
id   $completed   - that is the correspondent id in the mirror tool (like Agenda item 2)
type   $id_in_path   - that is the correspondent type in the mirror tool (like this is a Link item)
builder   $builder   - if ="builder" then onclick shows in new window
icon   $icon   - if ="icon" then the small icon will appear if ="wrap" then wrapped settings are used (and no icon is displayed) if ="nolink" then only the name is returned with no href and no icon (note:only in this case, the result is not displayed, but returned)
   $level  
[ Top ]



display_added_resources [line 1539]

void display_added_resources( $type, $id, [ $style = ''])

this function is to display the resources that were added to a specific item



Parameters

   $type  
   $id  
   $style  
[ Top ]



display_resources [line 1568]

void display_resources( $showdeleteimg)

This function is to show the added resources when adding an item $showdeleteimg determine if the delete image should appear or not.

deleting an added resource is only possible through the resource linker file itself




Parameters

   $showdeleteimg  
[ Top ]



edit_added_resources [line 1499]

void edit_added_resources( $type, $id)

this function is to load the resources that were added to a specific item

into the session variables




Parameters

   $type  
   $id  
[ Top ]



file_or_folder [line 218]

void file_or_folder( $filefolder $filefolder)

Checks wether something is a file or a folder

  1. means file, 1 means folder




Parameters

$filefolder   $filefolder  
[ Top ]



get_addedresource_link_in_learnpath [line 1136]

void get_addedresource_link_in_learnpath( type $type, id $id, id_in_path $id_in_path)

This function is to create and return a link to the added resources (lessons).

It returns the same thing as display_addedresource_link_in_learnpath() but doesn't display anything.

Parameters:




Parameters

type   $type   - that is the correspondent type in the mirror tool (like this is a Link item)
id   $id   - that is the correspondent id in the mirror tool (like Agenda item 2)
id_in_path   $id_in_path   - the unique index in the items table
[ Top ]



remove_resource [line 1420]

void remove_resource( $resource_key)

This function is to remove an resource item from the array



Parameters

   $resource_key  
[ Top ]



showorhide_addresourcelink [line 1644]

void showorhide_addresourcelink( $type, $id)

This function checks wether the link add resource should be displayed next the item in the linker page

So we have to check if the specific id of that tool is already in the array of the added resources if it is already in, the link should not be showed since it would make it possible to add the same resource a second time (=duplication of added resources)




Parameters

   $type  
   $id  
[ Top ]



show_addresource_button [line 1434]

void show_addresource_button( [ $additionalparameters = ''])

This function is to show the button "click to add resource" on the tool page



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University


Parameters

   $additionalparameters  
[ Top ]



show_documents [line 93]

void show_documents( $folder $folder)

Shows the documents of the document tool



Parameters

$folder   $folder  
[ Top ]



show_folder_up [line 67]

void show_folder_up( )

Insert description here.



[ Top ]



store_resources [line 235]

void store_resources( $source_type $source_type, $source_id $source_id)

Inserts a resource into the database



Parameters

$source_type   $source_type  
$source_id   $source_id  
[ Top ]



unset_session_resources [line 56]

void unset_session_resources( )



[ Top ]



update_added_resources [line 1520]

void update_added_resources( $type, $id)

this function is store the modified resources first we delete all the added resources in the database, then we add all the resources from the session object.



Parameters

   $type  
   $id  
[ Top ]



Documentation generated on Wed, 05 Sep 2007 06:15:04 +0200 by phpDocumentor 1.4.0