Preview: QuestionanswerbulkForm.php
                Size: 1.49 KB
              
              
                
              
            
            /home/jambtst2015/public_html/protected/models/QuestionanswerbulkForm.php
            <?php
/**
 * ContactForm class.
 * ContactForm is the data structure for keeping
 * contact form data. It is used by the 'contact' action of 'SiteController'.
 */
class QuestionanswerbulkForm extends CFormModel
{
	public $exam_name;
	public $paper_name;
	public $subject_name;
	public $marks;
	public $compulsory;
	public $question;
	public $question_paper_name;
	public $pass_marks;
	public $body;
	public $verifyCode;
	public $correct_answer;
	public $answer1;
	public $answer2;
	public $answer3;
	public $answer4;
	public $answer5;
	public $correct_ans;
	public $qusfile;
	/**
	 * Declares the validation rules.
	 */
	public function rules()
	{
		return array(
			// name, email, subject and body are required
			//array('image', 'file','types'=>'jpg, gif, png, jpeg', 'allowEmpty'=>true, 'on'=>'update'),
			array('exam_name,subject_name,paper_name', 'required'),
			array('qusfile', 'file', 'allowEmpty' => true, 'types' => 'csv'),
			array('correct_ans', 'safe'),
		    
			// email has to be a valid email address
			//array('email', 'email'),
			// verifyCode needs to be entered correctly
			//array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements()),
		);
	}
	/**
	 * Declares customized attribute labels.
	 * If not declared here, an attribute would have a label that is
	 * the same as its name with the first letter in upper case.
	 */
	public function attributeLabels()
	{
		return array(
			'verifyCode'=>'Verification Code',
		);
	}
}
                                          Directory Contents
Dirs: 0 × Files: 45