|
|
|
@ -174,7 +174,7 @@ class EvalForm extends FormValidator |
|
|
|
|
$result = $result_and_user['result']; |
|
|
|
|
|
|
|
|
|
$renderer = &$this->defaultRenderer(); |
|
|
|
|
$this->add_textfield('score[' . $result->get_id() . ']', $this->build_stud_label($user['user_id'], $user['username'], $user['lastname'], $user['firstname']), false, array('class' => "span2", |
|
|
|
|
$this->addText('score[' . $result->get_id() . ']', $this->build_stud_label($user['user_id'], $user['username'], $user['lastname'], $user['firstname']), false, array('class' => "span2", |
|
|
|
|
'maxlength' => 5)); |
|
|
|
|
|
|
|
|
|
$this->addRule('score[' . $result->get_id() . ']', get_lang('OnlyNumbers'), 'numeric'); |
|
|
|
@ -275,14 +275,14 @@ class EvalForm extends FormValidator |
|
|
|
|
foreach ($tblusers as $user) { |
|
|
|
|
|
|
|
|
|
$element_name = 'score[' . $user[0] . ']'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scoreColumnProperties = array('class' => 'span1', 'maxlength' => 5); |
|
|
|
|
if ($firstUser) { |
|
|
|
|
$scoreColumnProperties['autofocus'] = ''; |
|
|
|
|
$firstUser = false; |
|
|
|
|
} |
|
|
|
|
//user_id, user.username, lastname, firstname |
|
|
|
|
$this->add_textfield($element_name, $this->build_stud_label($user[0], $user[1], $user[2], $user[3]), false, $scoreColumnProperties); |
|
|
|
|
$this->addText($element_name, $this->build_stud_label($user[0], $user[1], $user[2], $user[3]), false, $scoreColumnProperties); |
|
|
|
|
|
|
|
|
|
$this->addRule($element_name, get_lang('OnlyNumbers'), 'numeric'); |
|
|
|
|
$this->addRule(array($element_name, 'maxvalue'), get_lang('OverMax'), 'compare', '<='); |
|
|
|
@ -335,13 +335,13 @@ class EvalForm extends FormValidator |
|
|
|
|
$renderer->setElementTemplate('<span>{element}</span> '); |
|
|
|
|
$this->addElement('label', get_lang('User'), $userinfo['complete_name']); |
|
|
|
|
|
|
|
|
|
$this->add_textfield('score', array(get_lang('Score'), null, '/ ' . $this->evaluation_object->get_max()), false, array( |
|
|
|
|
$this->addText('score', array(get_lang('Score'), null, '/ ' . $this->evaluation_object->get_max()), false, array( |
|
|
|
|
'size' => '4', |
|
|
|
|
'class' => 'span1', |
|
|
|
|
'maxlength' => '5' |
|
|
|
|
)); |
|
|
|
|
|
|
|
|
|
/* $this->add_textfield('maximum', null, false, array ( |
|
|
|
|
/* $this->addText('maximum', null, false, array ( |
|
|
|
|
'size' => '4', |
|
|
|
|
'maxlength' => '5', |
|
|
|
|
'disabled' => 'disabled' |
|
|
|
@ -428,7 +428,7 @@ class EvalForm extends FormValidator |
|
|
|
|
$this->addElement('hidden', 'hid_user_id'); |
|
|
|
|
$this->addElement('hidden', 'hid_course_code'); |
|
|
|
|
|
|
|
|
|
$this->add_textfield('name', get_lang('EvaluationName'), true, array( |
|
|
|
|
$this->addText('name', get_lang('EvaluationName'), true, array( |
|
|
|
|
'class' => 'span3', |
|
|
|
|
'maxlength' => '50', |
|
|
|
|
'id' => 'evaluation_title' |
|
|
|
@ -471,13 +471,13 @@ class EvalForm extends FormValidator |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$this->add_textfield('weight_mask', array(get_lang('Weight'), null, ' [0 .. <span id="max_weight">' . $all_categories[0]->get_weight() . '</span>] '), true, array( |
|
|
|
|
$this->addText('weight_mask', array(get_lang('Weight'), null, ' [0 .. <span id="max_weight">' . $all_categories[0]->get_weight() . '</span>] '), true, array( |
|
|
|
|
'size' => '4', |
|
|
|
|
'maxlength' => '5', |
|
|
|
|
'class' => 'span1' |
|
|
|
|
)); |
|
|
|
|
|
|
|
|
|
/* $this->add_textfield('weight', array(null, null, '/ <span id="max_weight">'.$default_weight.'</span>'), true, array ( |
|
|
|
|
/* $this->addText('weight', array(null, null, '/ <span id="max_weight">'.$default_weight.'</span>'), true, array ( |
|
|
|
|
'size' => '4', |
|
|
|
|
'maxlength' => '5', |
|
|
|
|
'class' => 'span1' |
|
|
|
@ -486,19 +486,19 @@ class EvalForm extends FormValidator |
|
|
|
|
|
|
|
|
|
if ($edit) { |
|
|
|
|
if (!$this->evaluation_object->has_results()) { |
|
|
|
|
$this->add_textfield('max', get_lang('QualificationNumeric'), true, array( |
|
|
|
|
$this->addText('max', get_lang('QualificationNumeric'), true, array( |
|
|
|
|
'class' => 'span1', |
|
|
|
|
'maxlength' => '5' |
|
|
|
|
)); |
|
|
|
|
} else { |
|
|
|
|
$this->add_textfield('max', array(get_lang('QualificationNumeric'), get_lang('CannotChangeTheMaxNote')), false, array( |
|
|
|
|
$this->addText('max', array(get_lang('QualificationNumeric'), get_lang('CannotChangeTheMaxNote')), false, array( |
|
|
|
|
'class' => 'span1', |
|
|
|
|
'maxlength' => '5', |
|
|
|
|
'disabled' => 'disabled' |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$this->add_textfield('max', get_lang('QualificationNumeric'), true, array( |
|
|
|
|
$this->addText('max', get_lang('QualificationNumeric'), true, array( |
|
|
|
|
'class' => 'span1', |
|
|
|
|
'maxlength' => '5' |
|
|
|
|
)); |
|
|
|
|