Procedural File: resourcelinker.inc.php
Source Location: /main/resourcelinker/resourcelinker.inc.php
Page Details:
Tags:
Includes:
check_added_resources [line 1481]
void check_added_resources(
$type, $id)
|
|
this function checks wether there are added resources or not
Parameters
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
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
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 |
|
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:
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) |
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:
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 |
|
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
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
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
file_or_folder [line 218]
void file_or_folder(
$filefolder $filefolder)
|
|
Checks wether something is a file or a folder - means file, 1 means folder
Parameters
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 |
remove_resource [line 1420]
void remove_resource(
$resource_key)
|
|
This function is to remove an resource item from the array
Parameters
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
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:
Parameters
show_documents [line 93]
void show_documents(
$folder $folder)
|
|
Shows the documents of the document tool
Parameters
show_folder_up [line 67]
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 |
|
unset_session_resources [line 56]
void unset_session_resources(
)
|
|
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
|