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

Class: Resource

Source Location: /main/coursecopy/classes/Resource.class.php

Class Overview


Representation of a resource in a Dokeos-course.


Author(s):

Variables

Methods


Child classes:

QuizQuestion
An QuizQuestion
SurveyQuestion
An QuizQuestion
ToolIntro
A WWW-link from the Links-module in a Dokeos-course.
Survey
A survey
SurveyInvitation
An SurveyInvitation
ForumCategory
A forum-category
ForumPost
A forum-post
Learnpath
A learnpath
Announcement
An announcement
ForumTopic
A forum-topic/thread
Document
An document
Quiz
An Quiz
Event
An event
Link
A WWW-link from the Links-module in a Dokeos-course.
LinkCategory
A LinkCategory
CourseDescription
A course description
Forum
A forum
ScormDocument
ScormDocument class

Class Details

[line 57]
Representation of a resource in a Dokeos-course.

This is a base class of which real resource-classes (for Links, Documents,...) should be derived.




Tags:

author:  Bart Mollet <bart.mollet@hogent.be>s
todo:  Use the gloabaly defined constants voor tools and remove the RESOURCE_* constants


[ Top ]


Class Variables

$destination_id =

[line 66]

The id from this resource in the destination course


Type:   mixed


[ Top ]

$item_properties =

[line 78]

The properties of this resource


Type:   mixed


[ Top ]

$linked_resources =

[line 74]

Linked resources


Type:   mixed


[ Top ]

$source_id =

[line 62]

The id from this resource in the source course


Type:   mixed


[ Top ]

$type =

[line 70]

The type of this resource


Type:   mixed


[ Top ]



Class Methods


constructor Resource [line 84]

Resource Resource( int $id, constant $type)

Create a new Resource



Parameters:

int   $id   The id of this resource in the source course.
constant   $type   The type of this resource.

[ Top ]

method add_linked_resource [line 95]

void add_linked_resource( $type, $id)

Add linked resource



Parameters:

   $type  
   $id  

[ Top ]

method get_id [line 121]

int get_id( )

Returns the id of this resource.



Tags:

return:  The id of this resource in the source course.


[ Top ]

method get_linked_resources [line 102]

void get_linked_resources( )

Get linked resources



[ Top ]

method get_tool [line 139]

void get_tool( )

Get the constant which defines the tool of this resource. This is used in the item_properties table.



Tags:

todo:  once the RESOURCE_* constants are replaced by the globally defined TOOL_* constants, this function will be replaced by get_type()


[ Top ]

method get_type [line 129]

constant get_type( )

Resturns the type of this resource



Tags:

return:  The type.


[ Top ]

method is_restored [line 195]

bool is_restored( )

Check if this resource is allready restored in the destination course.



Tags:

return:  true if allready restored (i.e. destination_id is set).


[ Top ]

method links_to [line 109]

void links_to( &$resource)

Checks if this resource links to a given resource



Parameters:

   &$resource  

[ Top ]

method set_new_id [line 187]

void set_new_id( int $id)

Set the destination id



Parameters:

int   $id   The id of this resource in the destination course.

[ Top ]

method show [line 202]

void show( )

Show this resource



Overridden in child classes as:

QuizQuestion::show()
Show this question
SurveyQuestion::show()
Show this question
ToolIntro::show()
Show this resource
Survey::show()
Show this survey
SurveyInvitation::show()
Show this invitation
ForumCategory::show()
Show this resource
ForumPost::show()
Show this resource
Learnpath::show()
Show this learnpath
Announcement::show()
Show this announcement
ForumTopic::show()
Show this resource
Document::show()
Show this document
Quiz::show()
Show this question
Event::show()
Show this Event
Link::show()
Show this resource
LinkCategory::show()
Show this LinkCategory
CourseDescription::show()
Show this Event
Forum::show()
Show this resource
ScormDocument::show()
Show this document

[ Top ]


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