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

Class: ExerciseLink

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

Class Overview

AbstractLink
   |
   --ExerciseLink

Defines a gradebook ExerciseLink object.


Author(s):

  • Bert Stepp�

Variables

Methods


Inherited Variables

Inherited Methods

Class: AbstractLink

AbstractLink::AbstractLink()
AbstractLink::add()
Insert this link into the database
AbstractLink::add_linked_data()
AbstractLink::add_target_subcategories()
Internal function used by get_target_categories()
AbstractLink::create_objects_from_mysql_result()
AbstractLink::delete()
Delete this link from the database
AbstractLink::delete_linked_data()
AbstractLink::find_links()
Find links by name To keep consistency, do not call this method but LinkFactory::find_links instead.
AbstractLink::get_all_links()
AbstractLink::get_category_id()
AbstractLink::get_course_code()
AbstractLink::get_date()
AbstractLink::get_icon_name()
AbstractLink::get_id()
AbstractLink::get_item_type()
AbstractLink::get_link()
AbstractLink::get_not_created_links()
AbstractLink::get_ref_id()
AbstractLink::get_target_categories()
Generate an array of possible categories where this link can be moved to.
AbstractLink::get_type()
AbstractLink::get_type_name()
AbstractLink::get_user_id()
AbstractLink::get_view_url()
AbstractLink::get_weight()
AbstractLink::has_results()
AbstractLink::is_allowed_to_change_name()
AbstractLink::is_valid_link()
AbstractLink::is_visible()
AbstractLink::load()
Retrieve links and return them as an array of extensions of AbstractLink.
AbstractLink::move_to_cat()
Move this link to the given category.
AbstractLink::needs_max()
AbstractLink::needs_name_and_description()
AbstractLink::needs_results()
AbstractLink::save()
Update the properties of this link in the database
AbstractLink::save_linked_data()
AbstractLink::set_category_id()
AbstractLink::set_course_code()
AbstractLink::set_date()
AbstractLink::set_description()
AbstractLink::set_id()
AbstractLink::set_max()
AbstractLink::set_name()
AbstractLink::set_ref_id()
AbstractLink::set_type()
AbstractLink::set_user_id()
AbstractLink::set_visible()
AbstractLink::set_weight()

Class Details

[line 9]
Defines a gradebook ExerciseLink object.



Tags:

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


[ Top ]


Class Variables

$course_info =  null

[line 15]



Tags:

access:  private

Type:   mixed


[ Top ]

$exercise_data =  null

[line 17]



Tags:

access:  private

Type:   mixed


[ Top ]

$exercise_table =  null

[line 16]



Tags:

access:  private

Type:   mixed


[ Top ]



Class Methods


constructor ExerciseLink [line 22]

ExerciseLink ExerciseLink( )



[ Top ]

method calc_score [line 101]

array calc_score( [$stud_id $stud_id = null])

Get the score of this exercise. Only the first attempts are taken into account.



Tags:

return:  (score, max) if student is given array (sum of scores, number of scores) otherwise or null if no scores available
access:  public


Parameters:

$stud_id   $stud_id   student id (default: all students who have results - then the average is returned)

[ Top ]

method get_all_links [line 61]

array get_all_links( )

Generate an array of all exercises available.



Tags:

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


Overrides AbstractLink::get_all_links() (parent method not documented)

[ Top ]

method get_description [line 181]

void get_description( )

Get description to display: same as exercise description



Tags:

access:  public


[ Top ]

method get_exercise_data [line 244]

void get_exercise_data( )

Lazy load function to get the database contents of this exercise



Tags:

access:  private


[ Top ]

method get_exercise_table [line 230]

void get_exercise_table( )

Lazy load function to get the database table of the exercise



Tags:

access:  private


[ Top ]

method get_link [line 158]

void get_link( )

Get URL where to go to if the user clicks on the link.

First we go to exercise_jump.php and then to the result page. Check this php file for more info.




Tags:

access:  public


Overrides AbstractLink::get_link() (parent method not documented)

[ Top ]

method get_name [line 172]

void get_name( )

Get name to display: same as exercise title



Tags:

access:  public


[ Top ]

method get_not_created_links [line 34]

array get_not_created_links( )

Generate an array of exercises that a teacher hasn't created a link for.



Tags:

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


Overrides AbstractLink::get_not_created_links() (parent method not documented)

[ Top ]

method get_type_name [line 199]

void get_type_name( )



Tags:

access:  public


Overrides AbstractLink::get_type_name() (parent method not documented)

[ Top ]

method has_results [line 83]

void has_results( )

Has anyone done this exercise yet ?



Tags:

access:  public


Overrides AbstractLink::has_results() (parent method not documented)

[ Top ]

method is_allowed_to_change_name [line 219]

void is_allowed_to_change_name( )



Tags:

access:  public


Overrides AbstractLink::is_allowed_to_change_name() (parent method not documented)

[ Top ]

method is_valid_link [line 190]

void is_valid_link( )

Check if this still links to an exercise



Tags:

access:  public


Overrides AbstractLink::is_valid_link() (parent method not documented)

[ Top ]

method needs_max [line 209]

void needs_max( )



Tags:

access:  public


Overrides AbstractLink::needs_max() (parent method not documented)

[ Top ]

method needs_name_and_description [line 204]

void needs_name_and_description( )



Tags:

access:  public


Overrides AbstractLink::needs_name_and_description() (parent method not documented)

[ Top ]

method needs_results [line 214]

void needs_results( )



Tags:

access:  public


Overrides AbstractLink::needs_results() (parent method not documented)

[ Top ]


Documentation generated on Thu, 12 Jun 2008 13:25:24 -0500 by phpDocumentor 1.4.1