Class: iHRIS Scheduled Training Course: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 1: Line 1:
This article describes the class ''iHRIS_Scheduled_Training_Course''.
This article describes the class ''iHRIS_Scheduled_Training_Course''.
*Extends the class: [[Class: I2CE_List | I2CE_List]].
*Extends the class: [[Class: I2CE_List | I2CE_List]].
*Location: Part of the module [[iHRIS Module List#training-course|training-course]] in the package [https://launchpad.net/ihris-common iHRIS Common]
*Location: Part of the module [[iHRIS Common Module List#training-course|training-course]] in the package [https://launchpad.net/ihris-common iHRIS Common]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/ihris-common/4.0.0-release/annotate/head:/modules/TrainingCourse/lib/iHRIS_Scheduled_Training_Course.php modules/TrainingCourse/lib/iHRIS_Scheduled_Training_Course.php]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/ihris-common/4.0.0-release/annotate/head:/modules/TrainingCourse/lib/iHRIS_Scheduled_Training_Course.php modules/TrainingCourse/lib/iHRIS_Scheduled_Training_Course.php]
*Author: Carl Leitner <litlfred@ibiblio.org>
*Author: Carl Leitner <litlfred@ibiblio.org>
Line 8: Line 8:
This class is a [[Class: I2CE_Form |form class]] and provides the following [[Class: I2CE_FormField |form fields]]
This class is a [[Class: I2CE_Form |form class]] and provides the following [[Class: I2CE_FormField |form fields]]
==training_course==
==training_course==
The form field ''training_course'' is implemented by [[Class: I2CE_FormField_MAP |MAP ]]
The form field ''training_course'' is implemented by [[Class: I2CE_FormField_MAP |MAP ]]
==name==
==name==
The form field ''name'' is implemented by [[Class: I2CE_FormField_STRING_LINE |STRING_LINE ]]
The form field ''name'' is implemented by [[Class: I2CE_FormField_STRING_LINE |STRING_LINE ]]
==num_students==
==num_students==
The form field ''num_students'' is implemented by [[Class: I2CE_FormField_INT |INT ]]
The form field ''num_students'' is implemented by [[Class: I2CE_FormField_INT |INT ]]
==notes==
==notes==
The form field ''notes'' is implemented by [[Class: I2CE_FormField_STRING_MLINE |STRING_MLINE ]]
The form field ''notes'' is implemented by [[Class: I2CE_FormField_STRING_MLINE |STRING_MLINE ]]
==instructors==
==instructors==
The form field ''instructors'' is implemented by [[Class: I2CE_FormField_STRING_MLINE |STRING_MLINE ]]
The form field ''instructors'' is implemented by [[Class: I2CE_FormField_STRING_MLINE |STRING_MLINE ]]
==start_date==
==start_date==
The form field ''start_date'' is implemented by [[Class: I2CE_FormField_DATE_YMD |DATE_YMD ]]
The form field ''start_date'' is implemented by [[Class: I2CE_FormField_DATE_YMD |DATE_YMD ]]
==end_date==
==end_date==
The form field ''end_date'' is implemented by [[Class: I2CE_FormField_DATE_YMD |DATE_YMD ]]
The form field ''end_date'' is implemented by [[Class: I2CE_FormField_DATE_YMD |DATE_YMD ]]
==location==
==location==
The form field ''location'' is implemented by [[Class: I2CE_FormField_MAP |MAP ]]
The form field ''location'' is implemented by [[Class: I2CE_FormField_MAP |MAP ]]
==Constants==
==Constants==
===iHRIS_Scheduled_Training_Course::MAIN_FIELD===
===iHRIS_Scheduled_Training_Course::MAIN_FIELD===

Revision as of 13:12, 19 October 2009

This article describes the class iHRIS_Scheduled_Training_Course.

iHRIS_Scheduled_Training_Course

Form Fields

This class is a form class and provides the following form fields

training_course

The form field training_course is implemented by MAP

name

The form field name is implemented by STRING_LINE

num_students

The form field num_students is implemented by INT

notes

The form field notes is implemented by STRING_MLINE

instructors

The form field instructors is implemented by STRING_MLINE

start_date

The form field start_date is implemented by DATE_YMD

end_date

The form field end_date is implemented by DATE_YMD

location

The form field location is implemented by MAP

Constants

iHRIS_Scheduled_Training_Course::MAIN_FIELD

The main field name used for display a description of a record. Defined as: "name"

iHRIS_Scheduled_Training_Course::SEC_FIELD

The main field name used for display a description of a record. Defined as: "start_date"

Methods

enrolledStudents()

  • Signature: public function enrolledStudents($node,$template,$args)
  • Parameters:
    • $node
    • $template
    • $args

enrolledStudentsExpander()

  • Signature: public function enrolledStudentsExpander($node,$template)
  • Parameters:
    • $node
    • $template

enrolledStudentsList()

  • Signature: public function enrolledStudentsList($node,$template)
  • Parameters:
    • $node
    • $template

getEnrolledStudents()

  • Signature: public function getEnrolledStudents()

getScheduledCourses()

Return the list of scheduled course for the given course id.

  • Signature: static public function getScheduledCourses($course_id,$flat)
  • Parameters:
    • integer $course_id
      Defaults to zero meaning we get all courses
      • Default Value: 0
    • boolean $flat
      defaults to false
      • Default Value: false
  • Returns: array
    the keys are the id of the scheduled course, the values are the string "$start_date -- $end_date"

getScheduledStudentIds()

  • Signature: public function getScheduledStudentIds()

numberEnrolledStudents()

  • Signature: public function numberEnrolledStudents($node,$template)
  • Parameters:
    • $node
    • $template

validate()

Perform any extra validation for the license.

  • Signature: public function validate($page)
  • Parameters: