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

Class: EvalForm

Source Location: /main/gradebook/lib/fe/evalform.class.php

Class Overview

HTML_Common
   |
   --HTML_QuickForm
      |
      --FormValidator
         |
         --EvalForm

Extends formvalidator with add&edit forms for evaluations


Author(s):

  • Stijn Konings

Version:

  • 2.0

Variables

Constants

Methods


Inherited Variables

Inherited Methods

Class: FormValidator

FormValidator::FormValidator()
Constructor
FormValidator::add_datepicker()
Add a datepicker element to the form
FormValidator::add_datepickerdate()
Add a datepickerdate element to the form
FormValidator::add_html_editor()
Add a HTML-editor to the form to fill in a title.
FormValidator::add_multiple_required_rule()
This function avoid to change directly QuickForm class.
FormValidator::add_progress_bar()
Adds a progress bar to the form.
FormValidator::add_real_progress_bar()
Use the new functions (php 5.2) allowing to display a real upload progress.
FormValidator::add_resource_button()
Add a button to the form to add resources.
FormValidator::add_textfield()
Add a textfield to the form.
FormValidator::add_timewindow()
Add a timewindow element to the form.
FormValidator::display()
Display the form.
FormValidator::return_form()
Returns the HTML code of the form.

Class: HTML_QuickForm

HTML_QuickForm::HTML_QuickForm()
Class constructor
HTML_QuickForm::accept()
Accepts a renderer
HTML_QuickForm::addElement()
Adds an element into the form
HTML_QuickForm::addFormRule()
Adds a global validation rule
HTML_QuickForm::addGroup()
Adds an element group
HTML_QuickForm::addGroupRule()
Adds a validation rule for the given group of elements
HTML_QuickForm::addRule()
Adds a validation rule for the given field
HTML_QuickForm::apiVersion()
Returns the current API version
HTML_QuickForm::applyFilter()
Applies a data filter for the given field(s)
HTML_QuickForm::arrayMerge()
Merges two arrays
HTML_QuickForm::createElement()
Creates a new form element of the given type.
HTML_QuickForm::defaultRenderer()
Returns a reference to default renderer object
HTML_QuickForm::elementExists()
Returns true if element is in the form
HTML_QuickForm::errorMessage()
Return a textual error message for an QuickForm error code
HTML_QuickForm::exportValue()
Returns a 'safe' element's value
HTML_QuickForm::exportValues()
Returns 'safe' elements' values
HTML_QuickForm::freeze()
Displays elements without HTML input tags
HTML_QuickForm::getElement()
Returns a reference to the element
HTML_QuickForm::getElementError()
Returns error corresponding to validated element
HTML_QuickForm::getElementType()
Returns the type of the given element
HTML_QuickForm::getElementValue()
Returns the element's raw value
HTML_QuickForm::getMaxFileSize()
Returns the value of MAX_FILE_SIZE hidden element
HTML_QuickForm::getRegisteredRules()
Returns an array of registered validation rules
HTML_QuickForm::getRegisteredTypes()
Returns an array of registered element types
HTML_QuickForm::getRequiredNote()
Returns the required note
HTML_QuickForm::getSubmitValue()
Returns the elements value after submit and filter
HTML_QuickForm::getSubmitValues()
Returns the values submitted by the form
HTML_QuickForm::getValidationScript()
Returns the client side validation script
HTML_QuickForm::insertElementBefore()
Inserts a new element right before the other element
HTML_QuickForm::isElementFrozen()
Returns whether or not the form element is frozen
HTML_QuickForm::isElementRequired()
Returns whether or not the form element is required
HTML_QuickForm::isError()
Tell whether a result from a QuickForm method is an error (an instance of HTML_QuickForm_Error)
HTML_QuickForm::isFrozen()
Returns whether or not the whole form is frozen
HTML_QuickForm::isRuleRegistered()
Returns whether or not the given rule is supported
HTML_QuickForm::isSubmitted()
Tells whether the form was already submitted
HTML_QuickForm::isTypeRegistered()
Returns whether or not the form element type is supported
HTML_QuickForm::process()
Performs the form data processing
HTML_QuickForm::registerElementType()
Registers a new element type
HTML_QuickForm::registerRule()
Registers a new validation rule
HTML_QuickForm::removeElement()
Removes an element
HTML_QuickForm::setConstants()
Initializes constant form values.
HTML_QuickForm::setDatasource()
Sets a datasource object for this form object
HTML_QuickForm::setDefaults()
Initializes default form values
HTML_QuickForm::setElementError()
Set error message for a form element
HTML_QuickForm::setJsWarnings()
Sets JavaScript warning messages
HTML_QuickForm::setMaxFileSize()
Sets the value of MAX_FILE_SIZE hidden element
HTML_QuickForm::setRequiredNote()
Sets required-note
HTML_QuickForm::toArray()
Returns the form's contents in an array.
HTML_QuickForm::toHtml()
Returns an HTML version of the form
HTML_QuickForm::updateElementAttr()
Updates Attributes for one or more elements
HTML_QuickForm::validate()
Performs the server side validation
HTML_QuickForm::_loadElement()
Returns a form element of the given type
HTML_QuickForm::_recursiveFilter()
Recursively apply a filter function
HTML_QuickForm::_reindexFiles()
A helper function to change the indexes in $_FILES array

Class: HTML_Common

HTML_Common::HTML_Common()
Class constructor
HTML_Common::apiVersion()
Returns the current API version
HTML_Common::display()
Displays the HTML to the screen
HTML_Common::getAttribute()
Returns the value of the given attribute
HTML_Common::getAttributes()
Returns the assoc array (default) or string of attributes
HTML_Common::getComment()
Returns the HTML comment
HTML_Common::getTabOffset()
Returns the tabOffset
HTML_Common::removeAttribute()
Removes an attribute
HTML_Common::setAttributes()
Sets the HTML attributes
HTML_Common::setComment()
Sets the HTML comment to be displayed at the beginning of the HTML string
HTML_Common::setLineEnd()
Sets the line end style to Windows, Mac, Unix or a custom string.
HTML_Common::setTab()
Sets the string used to indent HTML
HTML_Common::setTabOffset()
Sets the tab offset
HTML_Common::toHtml()
Abstract method. Must be extended to return the objects HTML
HTML_Common::updateAttributes()
Updates the passed attributes without changing the other existing attributes
HTML_Common::_getAttrKey()
Returns the array key for the given non-name-value pair attribute
HTML_Common::_getAttrString()
Returns an HTML formatted attribute string
HTML_Common::_getLineEnd()
Returns the lineEnd
HTML_Common::_getTab()
Returns a string containing the unit for indenting HTML
HTML_Common::_getTabs()
Returns a string containing the offset for the whole HTML code
HTML_Common::_parseAttributes()
Returns a valid atrributes array from either a string or array
HTML_Common::_removeAttr()
Removes the given attribute from the given array
HTML_Common::_updateAttrArray()
Updates the attributes in $attr1 with the values in $attr2 without changing the other existing attributes

Class Details

[line 12]
Extends formvalidator with add&edit forms for evaluations



Tags:

author:  Stijn Konings
version:  2.0


[ Top ]


Class Variables

$evaluation_object =

[line 22]



Tags:

access:  private

Type:   mixed


[ Top ]

$extra =

[line 24]



Tags:

access:  private

Type:   mixed


[ Top ]

$result_object =

[line 23]



Tags:

access:  private

Type:   mixed


[ Top ]



Class Methods


constructor EvalForm [line 35]

EvalForm EvalForm( int $form_type, obj $evaluation_object, obj $result_object, string $form_name, [method $method = 'post'], [action $action = null], [ $extra1 = null], [ $extra2 = null])

Builds a form containing form items based on a given parameter



Parameters:

int   $form_type   form_type 1=add, 2=edit,3=move,4=result_add
obj   $evaluation_object   cat_obj the category object
obj   $result_object   res_obj the result object
string   $form_name   form name
method   $method  
action   $action  
   $extra1  
   $extra2  

[ Top ]

method build_add_form [line 277]

void build_add_form( )

Builds a form to add an evaluation



Tags:

access:  protected


[ Top ]

method build_add_user_to_eval [line 80]

void build_add_user_to_eval( )

This form will build a form to add users to an evaluation



Tags:

access:  protected


[ Top ]

method build_all_results_edit_form [line 118]

void build_all_results_edit_form( )

This function builds a form to edit all results in an evaluation



Tags:

access:  protected


[ Top ]

method build_basic_form [line 305]

void build_basic_form( [ $edit = 0])

Builds a basic form that is used in add and edit



Tags:

access:  private


Parameters:

   $edit  

[ Top ]

method build_editing_form [line 294]

void build_editing_form( )

Builds a form to edit an evaluation



Tags:

access:  protected


[ Top ]

method build_move_form [line 172]

void build_move_form( )

This function builds a form to move an item to another category



Tags:

access:  protected


[ Top ]

method build_result_add_form [line 193]

void build_result_add_form( )

Builds a result form containing inputs for all students with a given course_code



Tags:

access:  protected


[ Top ]

method build_result_edit_form [line 239]

void build_result_edit_form( )

Builds a form to edit a result



Tags:

access:  protected


[ Top ]

method build_stud_label [line 365]

void build_stud_label( $id, $lastname, $firstname)



Tags:

access:  private


Parameters:

   $id  
   $lastname  
   $firstname  

[ Top ]

method display [line 355]

void display( )



Overrides FormValidator::display() (Display the form.)

[ Top ]

method setDefaults [line 359]

void setDefaults( [ $defaults = array ()])



Overrides HTML_QuickForm::setDefaults() (Initializes default form values)

Parameters:

   $defaults  

[ Top ]

method sort_by_user [line 388]

void sort_by_user( $item1, $item2)



Parameters:

   $item1  
   $item2  

[ Top ]


Class Constants

TYPE_ADD =  1

[line 14]


[ Top ]

TYPE_ADD_USERS_TO_EVAL =  7

[line 20]


[ Top ]

TYPE_ALL_RESULTS_EDIT =  6

[line 19]


[ Top ]

TYPE_EDIT =  2

[line 15]


[ Top ]

TYPE_MOVE =  3

[line 16]


[ Top ]

TYPE_RESULT_ADD =  4

[line 17]


[ Top ]

TYPE_RESULT_EDIT =  5

[line 18]


[ Top ]



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