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

Class: Evaluation

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

Class Overview


Defines a gradebook Evaluation object


Author(s):

  • Bert Stepp�, Stijn Konings

Implements interfaces:

Variables

Methods



Class Details

[line 9]
Defines a gradebook Evaluation object



Tags:

author:  Bert Stepp�, Stijn Konings
filesource:  Source Code for this file


[ Top ]


Class Variables

$category =

[line 19]



Tags:

access:  private

Type:   mixed


[ Top ]

$course_code =

[line 18]



Tags:

access:  private

Type:   mixed


[ Top ]

$description =

[line 16]



Tags:

access:  private

Type:   mixed


[ Top ]

$eval_date =

[line 20]



Tags:

access:  private

Type:   mixed


[ Top ]

$eval_max =

[line 22]



Tags:

access:  private

Type:   mixed


[ Top ]

$id =

[line 14]



Tags:

access:  private

Type:   mixed


[ Top ]

$name =

[line 15]



Tags:

access:  private

Type:   mixed


[ Top ]

$user_id =

[line 17]



Tags:

access:  private

Type:   mixed


[ Top ]

$visible =

[line 23]



Tags:

access:  private

Type:   mixed


[ Top ]

$weight =

[line 21]



Tags:

access:  private

Type:   mixed


[ Top ]



Class Methods


constructor Evaluation [line 27]

Evaluation Evaluation( )



[ Top ]

method add [line 212]

void add( )

Insert this evaluation into the database



Tags:

access:  public


[ Top ]

method add_target_subcategories [line 478]

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

Internal function used by get_target_categories()



Tags:

access:  private


Parameters:

   $targets  
   $level  
   $catid  

[ Top ]

method calc_score [line 409]

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

Calculate the score of this evaluation



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 for this eval - then the average is returned)

[ Top ]

method create_evaluation_objects_from_mysql_result [line 188]

void create_evaluation_objects_from_mysql_result( $result)



Tags:

access:  private


Parameters:

   $result  

[ Top ]

method delete [line 285]

void delete( )

Delete this evaluation from the database



Tags:

access:  public


[ Top ]

method delete_results [line 375]

void delete_results( )

Delete all results for this evaluation



Tags:

access:  public


[ Top ]

method delete_with_results [line 386]

void delete_with_results( )

Delete this evaluation and all underlying results.



Tags:

access:  public


[ Top ]

method does_name_exist [line 299]

void does_name_exist( $name $name, $parent $parent)

Check if an evaluation name (with the same parent category) already exists



Tags:

access:  public


Parameters:

$name   $name   name to check (if not given, the name property of this object will be checked)
$parent   $parent   parent category

[ Top ]

method find_evaluations [line 567]

array find_evaluations( string $name_mask, $selectcat)

Find evaluations by name



Tags:

return:  evaluation objects matching the search criterium
todo:  can be written more efficiently using a new (but very complex) sql query
access:  public


Parameters:

string   $name_mask   search string
   $selectcat  

[ Top ]

method get_category_id [line 58]

void get_category_id( )



Tags:

access:  public


[ Top ]

method get_course_code [line 53]

void get_course_code( )



Tags:

access:  public


[ Top ]

method get_date [line 63]

void get_date( )



Tags:

access:  public


[ Top ]

method get_description [line 43]

void get_description( )



Tags:

access:  public


[ Top ]

method get_evaluations_with_result_for_student [line 513]

void get_evaluations_with_result_for_student( [$cat_id $cat_id = null], $stud_id $stud_id)

Retrieve evaluations where a student has results for

and return them as an array of Evaluation objects




Tags:

access:  public


Parameters:

$cat_id   $cat_id   parent category (use 'null' to retrieve them in all categories)
$stud_id   $stud_id   student id

[ Top ]

method get_icon_name [line 589]

void get_icon_name( )



Tags:

access:  public


[ Top ]

method get_id [line 33]

void get_id( )



Tags:

access:  public


[ Top ]

method get_item_type [line 584]

void get_item_type( )



Tags:

access:  public


[ Top ]

method get_max [line 73]

void get_max( )



Tags:

access:  public


[ Top ]

method get_name [line 38]

void get_name( )



Tags:

access:  public


[ Top ]

method get_not_subscribed_students [line 541]

void get_not_subscribed_students( [ $first_letter_user = ''])

Get a list of students that do not have a result record for this evaluation



Tags:

access:  public


Parameters:

   $first_letter_user  

[ Top ]

method get_target_categories [line 441]

array get_target_categories( )

Generate an array of possible categories where this evaluation 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_user_id [line 48]

void get_user_id( )



Tags:

access:  public


[ Top ]

method get_weight [line 68]

void get_weight( )



Tags:

access:  public


[ Top ]

method has_results [line 344]

void has_results( )

Are there any results for this evaluation yet ? The 'max' property should not be changed then.



Tags:

access:  public


[ Top ]

method is_valid_score [line 396]

void is_valid_score( $score)

Check if the given score is possible for this evaluation



Tags:

access:  public


Parameters:

   $score  

[ Top ]

method is_visible [line 78]

void is_visible( )



Tags:

access:  public


[ Top ]

method load [line 144]

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

Retrieve evaluations and return them as an array of Evaluation objects



Tags:

access:  public


Parameters:

$id   $id   evaluation id
$user_id   $user_id   user id (evaluation owner)
$course_code   $course_code   course code
$category_id   $category_id   parent category
$visible   $visible   visible

[ Top ]

method move_to_cat [line 495]

void move_to_cat( $cat)

Move this evaluation to the given category.

If this evaluation moves from inside a course to outside, its course code is also changed.




Tags:

access:  public


Parameters:

   $cat  

[ Top ]

method save [line 245]

void save( )

Update the properties of this evaluation in the database



Tags:

access:  public


[ Top ]

method set_category_id [line 108]

void set_category_id( $category_id)



Tags:

access:  public


Parameters:

   $category_id  

[ Top ]

method set_course_code [line 103]

void set_course_code( $course_code)



Tags:

access:  public


Parameters:

   $course_code  

[ Top ]

method set_date [line 113]

void set_date( $date)



Tags:

access:  public


Parameters:

   $date  

[ Top ]

method set_description [line 93]

void set_description( $description)



Tags:

access:  public


Parameters:

   $description  

[ Top ]

method set_id [line 83]

void set_id( $id)



Tags:

access:  public


Parameters:

   $id  

[ Top ]

method set_max [line 123]

void set_max( $max)



Tags:

access:  public


Parameters:

   $max  

[ Top ]

method set_name [line 88]

void set_name( $name)



Tags:

access:  public


Parameters:

   $name  

[ Top ]

method set_user_id [line 98]

void set_user_id( $user_id)



Tags:

access:  public


Parameters:

   $user_id  

[ Top ]

method set_visible [line 128]

void set_visible( $visible)



Tags:

access:  public


Parameters:

   $visible  

[ Top ]

method set_weight [line 118]

void set_weight( $weight)



Tags:

access:  public


Parameters:

   $weight  

[ Top ]


Documentation generated on Thu, 12 Jun 2008 13:23:31 -0500 by phpDocumentor 1.4.1