Definition at line 9 of file class.ilMarkSchemaGUI.php.
◆ addMarkStep()
ilMarkSchemaGUI::addMarkStep |
( |
| ) |
|
|
protected |
◆ addSimpleMarkSchema()
ilMarkSchemaGUI::addSimpleMarkSchema |
( |
| ) |
|
|
protected |
Add a simple mark schema to the tests marks.
Definition at line 113 of file class.ilMarkSchemaGUI.php.
References ensureMarkSchemaCanBeEdited(), and showMarkSchema().
117 $this->
object->getMarkSchema()->createSimpleSchema(
118 $this->lng->txt(
'failed_short'), $this->lng->txt(
'failed_official'),
120 $this->lng->txt(
'passed_short'), $this->lng->txt(
'passed_official'),
showMarkSchema(ilPropertyFormGUI $ects_form=null)
Display mark schema.
ensureMarkSchemaCanBeEdited()
◆ deleteMarkSteps()
ilMarkSchemaGUI::deleteMarkSteps |
( |
| ) |
|
|
protected |
Delete selected mark steps.
Definition at line 129 of file class.ilMarkSchemaGUI.php.
References $_POST, ensureMarkSchemaCanBeEdited(), saveMarkSchemaFormData(), ilUtil\sendInfo(), and showMarkSchema().
133 if(!isset(
$_POST[
'marks']) || !is_array(
$_POST[
'marks']))
140 $delete_mark_steps = array();
141 foreach(
$_POST[
'marks'] as $mark_step_id)
143 $delete_mark_steps[] = $mark_step_id;
146 if(count($delete_mark_steps))
148 $this->
object->getMarkSchema()->deleteMarkSteps($delete_mark_steps);
saveMarkSchemaFormData()
Save the mark schema POST data when the form was submitted.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
showMarkSchema(ilPropertyFormGUI $ects_form=null)
Display mark schema.
ensureMarkSchemaCanBeEdited()
◆ ensureMarkSchemaCanBeEdited()
ilMarkSchemaGUI::ensureMarkSchemaCanBeEdited |
( |
| ) |
|
|
protected |
◆ executeCommand()
ilMarkSchemaGUI::executeCommand |
( |
| ) |
|
◆ getEctsForm()
ilMarkSchemaGUI::getEctsForm |
( |
| ) |
|
|
protected |
- Returns
- ilPropertyFormGUI
Definition at line 262 of file class.ilMarkSchemaGUI.php.
References ilSubEnabledFormPropertyGUI\addSubItem(), and ilFormPropertyGUI\setInfo().
Referenced by saveEctsForm(), and showMarkSchema().
264 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
267 $form->setFormAction($this->ctrl->getFormAction($this,
'saveEctsForm'));
268 $form->addCommandButton(
'saveEctsForm', $this->lng->txt(
'save'));
269 $form->setTitle($this->lng->txt(
'ects_output_of_ects_grades'));
271 $allow_ects_marks =
new ilCheckboxInputGUI($this->lng->txt(
'ects_allow_ects_grades'),
'ectcs_status');
272 for($i = ord(
'a'); $i <= ord(
'e'); $i++)
278 $this->lng->txt(
'ects_grade_desc_prefix') .
' ' . $this->lng->txt(
'ects_grade_' . $mark .
'_desc')
280 $mark_step->setSize(5);
281 $mark_step->allowDecimals(
true);
282 $mark_step->setMinValue(0,
true);
283 $mark_step->setMaxValue(100,
true);
284 $mark_step->setSuffix($this->lng->txt(
'percentile'));
285 $mark_step->setRequired(
true);
286 $allow_ects_marks->addSubItem($mark_step);
291 $this->lng->txt(
'ects_grade_desc_prefix') .
' ' . $this->lng->txt(
'ects_grade_f_desc')
293 $allow_ects_marks->addSubItem($mark_step);
300 $this->lng->txt(
'ects_grade_desc_prefix') .
' ' . $this->lng->txt(
'ects_grade_fx_desc')
302 $use_ects_fx->addSubItem($mark_step);
304 $threshold =
new ilNumberInputGUI($this->lng->txt(
'ects_fx_threshold'),
'ects_fx_threshold');
305 $threshold->
setInfo($this->lng->txt(
'ects_fx_threshold_info'));
306 $threshold->setSuffix($this->lng->txt(
'percentile'));
307 $threshold->allowDecimals(
true);
308 $threshold->setSize(5);
309 $threshold->setRequired(
true);
310 $use_ects_fx->addSubItem($threshold);
313 $form->addItem($allow_ects_marks);
This class represents a non editable value in a property form.
◆ objectSupportsEctsGrades()
ilMarkSchemaGUI::objectSupportsEctsGrades |
( |
| ) |
|
|
private |
◆ populateEctsForm()
- Parameters
-
Definition at line 241 of file class.ilMarkSchemaGUI.php.
References $data, and ilPropertyFormGUI\setValuesByArray().
Referenced by showMarkSchema().
245 $data[
'ectcs_status'] = $this->
object->getECTSOutput();
246 $data[
'use_ects_fx'] = preg_match(
'/\d+/', $this->object->getECTSFX());
247 $data[
'ects_fx_threshold'] = $this->
object->getECTSFX();
249 $ects_grades = $this->
object->getECTSGrades();
250 for($i = ord(
'a'); $i <= ord(
'e'); $i++)
253 $data[
'ects_grade_' . $mark] = $ects_grades[chr($i - 32)];
◆ saveEctsForm()
ilMarkSchemaGUI::saveEctsForm |
( |
| ) |
|
|
protected |
Definition at line 321 of file class.ilMarkSchemaGUI.php.
References getEctsForm(), objectSupportsEctsGrades(), ilUtil\sendSuccess(), and showMarkSchema().
330 if(!$ects_form->checkInput())
332 $ects_form->setValuesByPost();
338 for($i = ord(
'a'); $i <= ord(
'e'); $i++)
341 $grades[chr($i - 32)] = $ects_form->getInput(
'ects_grade_' . $mark);
344 $this->
object->setECTSGrades($grades);
345 $this->
object->setECTSOutput((
int)$ects_form->getInput(
'ectcs_status'));
346 $this->
object->setECTSFX(
347 $ects_form->getInput(
'use_ects_fx') && preg_match(
'/\d+/', $ects_form->getInput(
'ects_fx_threshold')) ?
348 $ects_form->getInput(
'ects_fx_threshold'):
352 $this->
object->saveECTSStatus();
355 $ects_form->setValuesByPost();
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
objectSupportsEctsGrades()
showMarkSchema(ilPropertyFormGUI $ects_form=null)
Display mark schema.
◆ saveMarks()
ilMarkSchemaGUI::saveMarks |
( |
| ) |
|
|
protected |
Save the mark schema.
Definition at line 161 of file class.ilMarkSchemaGUI.php.
References $result, ensureMarkSchemaCanBeEdited(), saveMarkSchemaFormData(), ilUtil\sendFailure(), and ilUtil\sendSuccess().
168 $result = $this->
object->checkMarks();
172 $result = $this->lng->txt(
'mark_schema_invalid');
181 $this->
object->getMarkSchema()->saveToDb($this->object->getMarkSchemaForeignId());
182 $this->
object->onMarkSchemaSaved();
186 $this->ctrl->redirect($this);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
saveMarkSchemaFormData()
Save the mark schema POST data when the form was submitted.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
ensureMarkSchemaCanBeEdited()
◆ saveMarkSchemaFormData()
ilMarkSchemaGUI::saveMarkSchemaFormData |
( |
| ) |
|
|
protected |
Save the mark schema POST data when the form was submitted.
Definition at line 93 of file class.ilMarkSchemaGUI.php.
References $_POST, and ilUtil\stripSlashes().
Referenced by addMarkStep(), deleteMarkSteps(), and saveMarks().
95 $this->
object->getMarkSchema()->flush();
96 foreach(
$_POST as $key => $value)
98 if(preg_match(
'/mark_short_(\d+)/', $key, $matches))
100 $this->
object->getMarkSchema()->addMarkStep(
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
◆ showMarkSchema()
Display mark schema.
- Parameters
-
Definition at line 202 of file class.ilMarkSchemaGUI.php.
References getEctsForm(), ilSubmitButton\getInstance(), objectSupportsEctsGrades(), populateEctsForm(), and ilUtil\sendInfo().
Referenced by addMarkStep(), addSimpleMarkSchema(), deleteMarkSteps(), and saveEctsForm().
204 if(!$this->object->canEditMarks())
209 $this->toolbar->setFormAction($this->ctrl->getFormAction($this,
'showMarkSchema'));
211 if($this->object->canEditMarks())
213 require_once
'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
215 $create_simple_mark_schema_button->setCaption($this->lng->txt(
'tst_mark_create_simple_mark_schema'),
false);
216 $create_simple_mark_schema_button->setCommand(
'addSimpleMarkSchema');
217 $this->toolbar->addButtonInstance($create_simple_mark_schema_button);
220 require_once
'Modules/Test/classes/tables/class.ilMarkSchemaTableGUI.php';
223 $content_parts = array($mark_schema_table->getHTML());
232 $content_parts[] = $ects_form->
getHTML();
235 $this->tpl->setContent(implode(
'<br />', $content_parts));
objectSupportsEctsGrades()
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
populateEctsForm(ilPropertyFormGUI $form)
◆ $ctrl
◆ $lng
◆ $object
◆ $toolbar
ilMarkSchemaGUI::$toolbar |
|
protected |
◆ $tpl
The documentation for this class was generated from the following file: