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

Class: AbstractLink

Source Location: /main/gradebook/lib/be/abstractlink.class.php

Class Overview


Defines a gradebook AbstractLink object.


Author(s):

  • Bert Stepp�

Implements interfaces:

Variables

Methods


Child classes:

EvalLink
Class to be used as basis for links referring to Evaluation objects.
LearnpathLink
Defines a gradebook LearnpathLink object.
ExerciseLink
Defines a gradebook ExerciseLink object.

Class Details

[line 12]
Defines a gradebook AbstractLink object.

To implement specific links, extend this class and define a type in LinkFactory. Use the methods in LinkFactory to create link objects.




Tags:

author:  Bert Stepp�
abstract:  
filesource:  Source Code for this file


[ Top ]


Class Variables

$category =

[line 22]



Tags:

access:  protected

Type:   mixed


[ Top ]

$course_code =

[line 21]



Tags:

access:  protected

Type:   mixed


[ Top ]

$id =

[line 17]



Tags:

access:  protected

Type:   mixed


[ Top ]

$link_date =

[line 23]



Tags:

access:  protected

Type:   mixed


[ Top ]

$ref_id =

[line 19]



Tags:

access:  protected

Type:   mixed


[ Top ]

$type =

[line 18]



Tags:

access:  protected

Type:   mixed


[ Top ]

$user_id =

[line 20]



Tags:

access:  protected

Type:   mixed


[ Top ]

$visible =

[line 25]



Tags:

access:  protected

Type:   mixed


[ Top ]

$weight =

[line 24]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor AbstractLink [line 29]

AbstractLink AbstractLink( )



[ Top ]

method add [line 215]

void add( )

Insert this link into the database



Tags:

access:  public


[ Top ]

method add_linked_data [line 403]

void add_linked_data( )



Tags:

access:  public


Overridden in child classes as:

EvalLink::add_linked_data()

[ Top ]

method add_target_subcategories [line 312]

void add_target_subcategories( $targets, $level, $catid)

Internal function used by get_target_categories()



Tags:

access:  private


Parameters:

   $targets  
   $level  
   $catid  

[ Top ]

method create_objects_from_mysql_result [line 192]

void create_objects_from_mysql_result( $result)



Tags:

access:  private


Parameters:

   $result  

[ Top ]

method delete [line 274]

void delete( )

Delete this link from the database



Tags:

access:  public


[ Top ]

method delete_linked_data [line 411]

void delete_linked_data( )



Tags:

access:  public


Overridden in child classes as:

EvalLink::delete_linked_data()

[ Top ]

method find_links [line 346]

void find_links( $name_mask, $selectcat)

Find links by name To keep consistency, do not call this method but LinkFactory::find_links instead.



Tags:

todo:  can be written more efficiently using a new (but very complex) sql query
access:  public


Parameters:

   $name_mask  
   $selectcat  

[ Top ]

method get_all_links [line 398]

void get_all_links( )



Tags:

access:  public


Overridden in child classes as:

LearnpathLink::get_all_links()
Generate an array of all learnpaths available.
ExerciseLink::get_all_links()
Generate an array of all exercises available.

[ Top ]

method get_category_id [line 60]

void get_category_id( )



Tags:

access:  public


[ Top ]

method get_course_code [line 55]

void get_course_code( )



Tags:

access:  public


[ Top ]

method get_date [line 65]

void get_date( )



Tags:

access:  public


[ Top ]

method get_icon_name [line 367]

void get_icon_name( )



Tags:

access:  public


[ Top ]

method get_id [line 35]

void get_id( )



Tags:

access:  public


[ Top ]

method get_item_type [line 362]

void get_item_type( )



Tags:

access:  public


[ Top ]

method get_link [line 376]

void get_link( )



Tags:

abstract:  


Overridden in child classes as:

EvalLink::get_link()
LearnpathLink::get_link()
Get URL where to go to if the user clicks on the link.
ExerciseLink::get_link()
Get URL where to go to if the user clicks on the link.

[ Top ]

method get_not_created_links [line 394]

void get_not_created_links( )



Tags:

access:  public


Overridden in child classes as:

LearnpathLink::get_not_created_links()
Generate an array of learnpaths that a teacher hasn't created a link for.
ExerciseLink::get_not_created_links()
Generate an array of exercises that a teacher hasn't created a link for.

[ Top ]

method get_ref_id [line 45]

void get_ref_id( )



Tags:

access:  public


[ Top ]

method get_target_categories [line 292]

array get_target_categories( )

Generate an array of possible categories where this link can be moved to.

Notice: its own parent will be included in the list: it's up to the frontend to disable this element.




Tags:

return:  2-dimensional array - every element contains 3 subelements (id, name, level)
access:  public


[ Top ]

method get_type [line 40]

void get_type( )



Tags:

access:  public


[ Top ]

method get_type_name [line 378]


method get_user_id [line 50]

void get_user_id( )



Tags:

access:  public


[ Top ]

method get_view_url [line 428]

void get_view_url( $stud_id)



Tags:

access:  public


Overridden in child classes as:

DropboxLink::get_view_url()
StudentPublicationLink::get_view_url()

Parameters:

   $stud_id  

[ Top ]

method get_weight [line 70]

void get_weight( )



Tags:

access:  public


[ Top ]

method has_results [line 375]

void has_results( )



Tags:

abstract:  


Overridden in child classes as:

EvalLink::has_results()
LearnpathLink::has_results()
Has anyone used this learnpath yet ?
ExerciseLink::has_results()
Has anyone done this exercise yet ?

[ Top ]

method is_allowed_to_change_name [line 389]


method is_valid_link [line 377]

void is_valid_link( )



Tags:

abstract:  


Overridden in child classes as:

EvalLink::is_valid_link()
LearnpathLink::is_valid_link()
Check if this still links to a learnpath
ExerciseLink::is_valid_link()
Check if this still links to an exercise

[ Top ]

method is_visible [line 75]

void is_visible( )



Tags:

access:  public


[ Top ]

method load [line 134]

void load( [ $id = null], [ $type = null], [ $ref_id = null], [ $user_id = null], [ $course_code = null], [ $category_id = null], [ $visible = null])

Retrieve links and return them as an array of extensions of AbstractLink.

To keep consistency, do not call this method but LinkFactory::load instead.




Tags:

access:  public


Parameters:

   $id  
   $type  
   $ref_id  
   $user_id  
   $course_code  
   $category_id  
   $visible  

[ Top ]

method move_to_cat [line 327]

void move_to_cat( $cat)

Move this link to the given category.

If this link moves to outside a course, delete it.




Tags:

access:  public


Parameters:

   $cat  

[ Top ]

method needs_max [line 387]

void needs_max( )



Tags:

abstract:  


Overridden in child classes as:

EvalLink::needs_max()
LearnpathLink::needs_max()
ExerciseLink::needs_max()

[ Top ]

method needs_name_and_description [line 386]

void needs_name_and_description( )



Tags:

abstract:  


Overridden in child classes as:

EvalLink::needs_name_and_description()
LearnpathLink::needs_name_and_description()
ExerciseLink::needs_name_and_description()

[ Top ]

method needs_results [line 388]

void needs_results( )



Tags:

abstract:  


Overridden in child classes as:

EvalLink::needs_results()
LearnpathLink::needs_results()
ExerciseLink::needs_results()

[ Top ]

method save [line 248]

void save( )

Update the properties of this link in the database



Tags:

access:  public


[ Top ]

method save_linked_data [line 407]

void save_linked_data( )



Tags:

access:  public


Overridden in child classes as:

EvalLink::save_linked_data()

[ Top ]

method set_category_id [line 107]

void set_category_id( $category_id)



Tags:

access:  public


Parameters:

   $category_id  

[ Top ]

method set_course_code [line 102]

void set_course_code( $course_code)



Tags:

access:  public


Parameters:

   $course_code  

[ Top ]

method set_date [line 112]

void set_date( $date)



Tags:

access:  public


Overridden in child classes as:

EvalLink::set_date()

Parameters:

   $date  

[ Top ]

method set_description [line 420]

void set_description( $description)



Tags:

access:  public


Overridden in child classes as:

EvalLink::set_description()

Parameters:

   $description  

[ Top ]

method set_id [line 82]

void set_id( $id)



Tags:

access:  public


Parameters:

   $id  

[ Top ]

method set_max [line 424]

void set_max( $max)



Tags:

access:  public


Overridden in child classes as:

EvalLink::set_max()

Parameters:

   $max  

[ Top ]

method set_name [line 416]

void set_name( $name)



Tags:

access:  public


Overridden in child classes as:

EvalLink::set_name()

Parameters:

   $name  

[ Top ]

method set_ref_id [line 92]

void set_ref_id( $ref_id)



Tags:

access:  public


Parameters:

   $ref_id  

[ Top ]

method set_type [line 87]

void set_type( $type)



Tags:

access:  public


Parameters:

   $type  

[ Top ]

method set_user_id [line 97]

void set_user_id( $user_id)



Tags:

access:  public


Parameters:

   $user_id  

[ Top ]

method set_visible [line 122]

void set_visible( $visible)



Tags:

access:  public


Overridden in child classes as:

EvalLink::set_visible()

Parameters:

   $visible  

[ Top ]

method set_weight [line 117]

void set_weight( $weight)



Tags:

access:  public


Overridden in child classes as:

EvalLink::set_weight()

Parameters:

   $weight  

[ Top ]


Documentation generated on Thu, 12 Jun 2008 12:53:14 -0500 by phpDocumentor 1.4.1