. */ class CandCDTasks extends Cand { /* Constructor * Make sure you set the name, and, when needed, if the field is * compulsory */ public function __construct($candidate_id) { $this->candidate_id = $candidate_id; $this->name = "CDTasks"; $this->compulsory = false; } /* get_print_name() * Return the name of the field (caption) to be shown in the application * form */ public function get_print_name() { return "CD tasks preference"; } /* get_print_name_short() * Return the name of the field (caption) to be shown in a table */ public function get_print_name_short() { return "CD tasks"; } /* get_print_value($readonly) * Return the value to be printed in the form (with text boxes etc) * @param: readonly: if the field can be changed (false) or not (true) */ public function get_print_value($readonly=false) { $r = ""; $r .= "
If you apply for the post of Member of the Comité Directeur, which task(s) would you like to cover?"; $r .= ""; return $r; } /* set($value) * Check the supplied value and assign it if ok (return true), otherwise * set an error and return false * @param: value: the value to be assigned and checked * @return: true on ok, false on error */ public function set($value) { if( strlen($value)>0 ) { $this->value = $value; return true; //}else { // $this->error = true; // $this->error_txt = "Please fill in your motivation.\n"; // return false; } return true; } public function get_access($new=true) { global $setup; if( get_sql_date($setup["EventDateEnd"]) >= "2016-07-01" ) return false; return parent::get_access($new); } public function get_accesspublic() { global $setup; if( get_sql_date($setup["EventDateEnd"]) >= "2016-07-01" ) return false; return parent::get_accesspublic(); } public function get_accesspublic_privacy($allowPublic) { global $setup; if( get_sql_date($setup["EventDateEnd"]) >= "2016-07-01" ) return false; return parent::get_accesspublic_privacy($allowPublic); } } ?>