ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjAssessmentFolderGUI Class Reference

Class ilObjAssessmentFolderGUI. More...

+ Inheritance diagram for ilObjAssessmentFolderGUI:
+ Collaboration diagram for ilObjAssessmentFolderGUI:

Public Member Functions

 ilObjAssessmentFolderGUI ($a_data, $a_id, $a_call_by_reference)
executeCommand ()
 execute command
 saveObject ()
 save object public
 settingsObject ()
 display assessment folder settings form
 saveSettingsObject ()
 Save Assessment settings.
 showLogObject ()
 Called when the a log should be shown.
 exportLogObject ()
 Called when the a log should be exported.
 logsObject ($p_from=null, $p_until=null, $p_test=null)
 display assessment folder logs form
 deleteLogObject ()
 Deletes the log entries for one or more tests.
 logAdminObject ()
 Administration output for assessment log files.
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getLogdataSubtabs ()
 defaultsObject ()
 Default settings tab for Test & Assessment.
 saveDefaultsObject ()
 Save default settings for test & assessment.
 getTabs (&$tabs_gui)
 get tabs
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getHTML ()
 undeleteObject ()
 Get objects back from trash.
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 createObject ()
 create new object form
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 trashObject ()
 Show trash content of object.
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.

Data Fields

 $conditions
 Constructor public.
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false

Additional Inherited Members

- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 afterUpdate ()
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 __showClipboardTable ($a_result_set, $a_from="")
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")

Detailed Description

Class ilObjAssessmentFolderGUI.

Author
Helmut Schottmüller hscho.nosp@m.ttm@.nosp@m.gmx.d.nosp@m.e
Version
Id:
class.ilObjAssessmentFolderGUI.php 29245 2011-05-25 08:49:55Z hschottm

ilObjAssessmentFolderGUI: ilPermissionGUI

Definition at line 36 of file class.ilObjAssessmentFolderGUI.php.

Member Function Documentation

ilObjAssessmentFolderGUI::defaultsObject ( )

Default settings tab for Test & Assessment.

Definition at line 420 of file class.ilObjAssessmentFolderGUI.php.

References $_GET, $ilCtrl, $ilDB, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setInfo(), and ilColorPickerInputGUI\setValue().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl, $tpl;
$assessmentSetting = new ilSetting("assessment");
$use_javascript = array_key_exists("use_javascript", $_GET) ? $_GET["use_javascript"] : $assessmentSetting->get("use_javascript");
$imap_line_color = array_key_exists("imap_line_color", $_GET) ? $_GET["imap_line_color"] : $assessmentSetting->get("imap_line_color");
if (strlen($imap_line_color) == 0) $imap_line_color = "FF0000";
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("assessment_defaults"));
// Enable javascript
$enable = new ilCheckboxInputGUI($lng->txt("assessment_use_javascript"), "use_javascript");
$enable->setChecked($use_javascript);
$enable->setInfo($lng->txt("assessment_use_javascript_desc"));
$form->addItem($enable);
$linepicker = new ilColorPickerInputGUI($lng->txt("assessment_imap_line_color"), "imap_line_color");
$linepicker->setValue($imap_line_color);
$form->addItem($linepicker);
if (@file_exists("./Modules/Test/classes/class.ilTestResultsToXML.php"))
{
global $ilDB;
$user_criteria = array_key_exists("user_criteria", $_GET) ? $_GET["user_criteria"] : $assessmentSetting->get("user_criteria");
$userCriteria = new ilSelectInputGUI($this->lng->txt("user_criteria"), "user_criteria");
$userCriteria->setInfo($this->lng->txt("user_criteria_desc"));
$userCriteria->setRequired(true);
$userCriteria->setValue(($isSingleline) ? 0 : 1);
$manager = $ilDB->db->loadModule('Manager');
$fields = $manager->listTableFields('usr_data');
$usr_fields = array();
foreach ($fields as $field)
{
$usr_fields[$field] = $field;
}
$userCriteria->setOptions($usr_fields);
$userCriteria->setValue($user_criteria);
$form->addItem($userCriteria);
}
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$form->addCommandButton("saveDefaults", $lng->txt("save"));
}
$tpl->setVariable("ADM_CONTENT", $form->getHTML());
}

+ Here is the call graph for this function:

ilObjAssessmentFolderGUI::deleteLogObject ( )

Deletes the log entries for one or more tests.

Definition at line 358 of file class.ilObjAssessmentFolderGUI.php.

References $_POST, logAdminObject(), ilUtil\sendInfo(), and ilUtil\sendSuccess().

{
if (is_array($_POST["chb_test"]) && (count($_POST["chb_test"])))
{
$this->object->deleteLogEntries($_POST["chb_test"]);
ilUtil::sendSuccess($this->lng->txt("ass_log_deleted"));
}
else
{
ilUtil::sendInfo($this->lng->txt("ass_log_delete_no_selection"));
}
$this->logAdminObject();
}

+ Here is the call graph for this function:

& ilObjAssessmentFolderGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 57 of file class.ilObjAssessmentFolderGUI.php.

References $cmd, $ret, and ilObjectGUI\prepareOutput().

{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
switch($next_class)
{
case 'ilpermissiongui':
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
default:
if($cmd == "" || $cmd == "view")
{
$cmd = "settings";
}
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjAssessmentFolderGUI::exportLogObject ( )

Called when the a log should be exported.

Definition at line 231 of file class.ilObjAssessmentFolderGUI.php.

References $_POST, $log, $row, $separator, $test, $title, ilObjTest\_getAvailableTests(), assQuestion\_getQuestionTitle(), ilObjUser\_lookupName(), ilUtil\deliverData(), IL_CAL_FKT_DATE, IL_CAL_UNIX, and ilUtil\processCSVRow().

{
$from = mktime($_POST['log_from']['time']['h'], $_POST['log_from']['time']['m'], 0, $_POST['log_from']['date']['m'], $_POST['log_from']['date']['d'], $_POST['log_from']['date']['y']);
$until = mktime($_POST['log_until']['time']['h'], $_POST['log_until']['time']['m'], 0, $_POST['log_until']['date']['m'], $_POST['log_until']['date']['d'], $_POST['log_until']['date']['y']);
$test = $_POST['sel_test'];
$csv = array();
$separator = ";";
$row = array(
$this->lng->txt("assessment_log_datetime"),
$this->lng->txt("user"),
$this->lng->txt("assessment_log_text"),
$this->lng->txt("question")
);
include_once "./Modules/Test/classes/class.ilObjTest.php";
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
$available_tests =& ilObjTest::_getAvailableTests(1);
array_push($csv, ilUtil::processCSVRow($row, TRUE, $separator));
$log_output =& $this->object->getLog($from, $until, $test);
$users = array();
foreach ($log_output as $key => $log)
{
if (!array_key_exists($log["user_fi"], $users))
{
$users[$log["user_fi"]] = ilObjUser::_lookupName($log["user_fi"]);
}
$title = "";
if ($log["question_fi"] || $log["original_fi"])
{
if (strlen($title) == 0)
{
}
$title = $this->lng->txt("assessment_log_question") . ": " . $title;
}
$csvrow = array();
$date = new ilDateTime($log['tstamp'],IL_CAL_UNIX);
array_push($csvrow, $date->get(IL_CAL_FKT_DATE,'Y-m-d H:i'));
array_push($csvrow, trim($users[$log["user_fi"]]["title"] . " " . $users[$log["user_fi"]]["firstname"] . " " . $users[$log["user_fi"]]["lastname"]));
array_push($csvrow, trim($log["logtext"]));
array_push($csvrow, $title);
array_push($csv, ilUtil::processCSVRow($csvrow, TRUE, $separator));
}
$csvoutput = "";
foreach ($csv as $row)
{
$csvoutput .= join($row, $separator) . "\n";
}
ilUtil::deliverData($csvoutput, str_replace(" ", "_", "log_" . $from . "_" . $until . "_" . $available_tests[$test]).".csv");
}

+ Here is the call graph for this function:

ilObjAssessmentFolderGUI::getAdminTabs ( $tabs_gui)

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 394 of file class.ilObjAssessmentFolderGUI.php.

References getTabs().

{
$this->getTabs($tabs_gui);
}

+ Here is the call graph for this function:

ilObjAssessmentFolderGUI::getLogdataSubtabs ( )

Definition at line 399 of file class.ilObjAssessmentFolderGUI.php.

Referenced by getTabs().

{
global $ilTabs;
// log output
$ilTabs->addSubTabTarget("ass_log_output",
$this->ctrl->getLinkTarget($this, "logs"),
array("logs", "showLog", "exportLog")
, "");
// log administration
$ilTabs->addSubTabTarget("ass_log_admin",
$this->ctrl->getLinkTarget($this, "logAdmin"),
array("logAdmin", "deleteLog"),
"", "");
}

+ Here is the caller graph for this function:

ilObjAssessmentFolderGUI::getTabs ( $tabs_gui)

get tabs

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

Definition at line 508 of file class.ilObjAssessmentFolderGUI.php.

References getLogdataSubtabs().

Referenced by getAdminTabs().

{
global $rbacsystem;
switch ($this->ctrl->getCmd())
{
case "logs":
case "showLog":
case "exportLog":
case "logAdmin":
case "deleteLog":
break;
}
if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
{
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "settings"), array("settings","","view"), "", "");
$tabs_gui->addTarget("logs",
$this->ctrl->getLinkTarget($this, "logs"),
array("logs","showLog", "exportLog", "logAdmin", "deleteLog"),
"", "");
$tabs_gui->addTarget("defaults",
$this->ctrl->getLinkTarget($this, "defaults"), array("defaults","saveDefaults"), "", "");
}
if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjAssessmentFolderGUI::ilObjAssessmentFolderGUI (   $a_data,
  $a_id,
  $a_call_by_reference 
)

Definition at line 44 of file class.ilObjAssessmentFolderGUI.php.

References ilObjectGUI\ilObjectGUI().

{
global $rbacsystem;
$this->type = "assf";
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
if (!$rbacsystem->checkAccess('read',$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read_assf"),$this->ilias->error_obj->WARNING);
}
}

+ Here is the call graph for this function:

ilObjAssessmentFolderGUI::logAdminObject ( )

Administration output for assessment log files.

Definition at line 375 of file class.ilObjAssessmentFolderGUI.php.

References ilObjectGUI\$data, ilObjectGUI\$obj_id, $title, and ilObjTest\_getAvailableTests().

Referenced by deleteLogObject().

{
global $ilAccess;
$a_write_access = ($ilAccess->checkAccess("write", "", $this->object->getRefId())) ? true : false;
include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogAdministrationTableGUI.php";
$table_gui = new ilAssessmentFolderLogAdministrationTableGUI($this, 'logAdmin', $a_write_access);
include_once "./Modules/Test/classes/class.ilObjTest.php";
$available_tests =& ilObjTest::_getAvailableTests(true);
$data = array();
foreach ($available_tests as $obj_id => $title)
{
$nr = $this->object->getNrOfLogEntries($obj_id);
array_push($data, array("title" => $title, "nr" => $nr, "id" => $obj_id));
}
$table_gui->setData($data);
$this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjAssessmentFolderGUI::logsObject (   $p_from = null,
  $p_until = null,
  $p_test = null 
)

display assessment folder logs form

Definition at line 286 of file class.ilObjAssessmentFolderGUI.php.

References $_GET, ilObjTest\_getAvailableTests(), IL_CAL_UNIX, ilUtil\prepareFormOutput(), ilUtil\sendInfo(), and ilDateTimeInputGUI\setShowDate().

Referenced by showLogObject().

{
$template = new ilTemplate("tpl.assessment_logs.html", TRUE, TRUE, "Modules/Test");
include_once "./Modules/Test/classes/class.ilObjTest.php";
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
$available_tests =& ilObjTest::_getAvailableTests(1);
if (count($available_tests) == 0)
{
ilUtil::sendInfo($this->lng->txt('assessment_log_no_data'));
return;
}
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTableWidth("100%");
$form->setId("logs");
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("assessment_log"));
$form->addItem($header);
// from
$from = new ilDateTimeInputGUI($this->lng->txt('cal_from'), "log_from");
$from->setShowDate(true);
$from->setShowTime(true);
$now = getdate();
$fromdate = ($p_from) ? $p_from : (($_GET['log_from']) ? $_GET['log_from'] : mktime(0, 0, 0, 1, 1, $now['year']));
$from->setDate(new ilDateTime($fromdate, IL_CAL_UNIX));
$form->addItem($from);
// until
$until = new ilDateTimeInputGUI($this->lng->txt('cal_until'), "log_until");
$until->setShowDate(true);
$until->setShowTime(true);
$untildate = ($p_until) ? $p_until : (($_GET['log_until']) ? $_GET['log_until'] : time());
$until->setDate(new ilDateTime($untildate, IL_CAL_UNIX));
$form->addItem($until);
// tests
$fortest = new ilSelectInputGUI($this->lng->txt('assessment_log_for_test'), "sel_test");
$options = array();
foreach ($available_tests as $key => $value)
{
$options[$key] = ilUtil::prepareFormOutput($value) . " [" . $this->object->getNrOfLogEntries($key) . " " . $this->lng->txt("assessment_log_log_entries") . "]";
}
$fortest->setOptions($options);
$p_test = ($p_test) ? $p_test : $_GET['sel_test'];
if ($p_test) $fortest->setValue($p_test);
$form->addItem($fortest);
$this->ctrl->setParameter($this, 'sel_test', $p_test);
$this->ctrl->setParameter($this, 'log_until', $untildate);
$this->ctrl->setParameter($this, 'log_from', $fromdate);
$form->addCommandButton("showLog", $this->lng->txt("show"));
$form->addCommandButton("exportLog", $this->lng->txt("export"));
$template->setVariable("FORM", $form->getHTML());
if ($p_test)
{
include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogTableGUI.php";
$table_gui = new ilAssessmentFolderLogTableGUI($this, 'logs');
$log_output =& $this->object->getLog($fromdate, $untildate, $p_test);
$table_gui->setData($log_output);
$template->setVariable('LOG', $table_gui->getHTML());
}
$this->tpl->setVariable("ADM_CONTENT", $template->get());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjAssessmentFolderGUI::saveDefaultsObject ( )

Save default settings for test & assessment.

Definition at line 477 of file class.ilObjAssessmentFolderGUI.php.

References $_POST, $ilCtrl, and ilUtil\sendSuccess().

{
global $ilCtrl;
$assessmentSetting = new ilSetting("assessment");
if ($_POST["use_javascript"])
{
$assessmentSetting->set("use_javascript", "1");
}
else
{
$assessmentSetting->set("use_javascript", "0");
}
if (strlen($_POST["imap_line_color"]) == 6)
{
$assessmentSetting->set("imap_line_color", $_POST["imap_line_color"]);
}
if (@file_exists("./Modules/Test/classes/class.ilTestResultsToXML.php"))
{
$assessmentSetting->set("user_criteria", $_POST["user_criteria"]);
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "defaults");
}

+ Here is the call graph for this function:

ilObjAssessmentFolderGUI::saveObject ( )

save object public

Reimplemented from ilObjectGUI.

Definition at line 89 of file class.ilObjAssessmentFolderGUI.php.

References ilUtil\sendSuccess().

{
global $rbacadmin;
// create and insert forum in objecttree
$newObj = parent::saveObject();
// put here object specific stuff
// always send a message
ilUtil::sendSuccess($this->lng->txt("object_added"),true);
$this->ctrl->redirect($this);
}

+ Here is the call graph for this function:

ilObjAssessmentFolderGUI::saveSettingsObject ( )

Save Assessment settings.

Definition at line 186 of file class.ilObjAssessmentFolderGUI.php.

References $_POST, $row, ilObjQuestionPool\_getQuestionTypes(), and ilUtil\sendSuccess().

{
global $ilAccess;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId())) $this->ctrl->redirect($this,'settings');
if ($_POST["chb_assessment_logging"] == 1)
{
$this->object->_enableAssessmentLogging(1);
}
else
{
$this->object->_enableAssessmentLogging(0);
}
$this->object->_setLogLanguage($_POST["reporting_language"]);
$this->object->_setManualScoring($_POST["chb_manual_scoring"]);
include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
$questiontypes =& ilObjQuestionPool::_getQuestionTypes(TRUE);
$forbidden_types = array();
foreach ($questiontypes as $name => $row)
{
if (!in_array($row["question_type_id"], $_POST["chb_allowed_questiontypes"]))
{
array_push($forbidden_types, $row["question_type_id"]);
}
}
$this->object->_setForbiddenQuestionTypes($forbidden_types);
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
$this->ctrl->redirect($this,'settings');
}

+ Here is the call graph for this function:

ilObjAssessmentFolderGUI::settingsObject ( )

display assessment folder settings form

Definition at line 108 of file class.ilObjAssessmentFolderGUI.php.

References $lang, ilObjQuestionPool\_getQuestionTypes(), and ilCheckboxGroupInputGUI\setValue().

{
global $ilAccess;
include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTableWidth("100%");
$form->setId("settings");
// general properties
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("assessment_log_logging"));
$form->addItem($header);
// assessment logging
$logging = new ilCheckboxInputGUI('', "chb_assessment_logging");
$logging->setValue(1);
$logging->setChecked($this->object->_enabledAssessmentLogging());
$logging->setOptionTitle($this->lng->txt("activate_assessment_logging"));
$form->addItem($logging);
// reporting language
$reporting = new ilSelectInputGUI($this->lng->txt('assessment_settings_reporting_language'), "reporting_language");
$languages = $this->lng->getInstalledLanguages();
$options = array();
foreach ($languages as $lang)
{
$options[$lang] = $this->lng->txt("lang_" . $lang);
}
$reporting->setOptions($options);
$reporting->setValue($this->object->_getLogLanguage());
$form->addItem($reporting);
// question settings
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("assf_questiontypes"));
$form->addItem($header);
// available question types
$allowed = new ilCheckboxGroupInputGUI($this->lng->txt('assf_allowed_questiontypes'), "chb_allowed_questiontypes");
$questiontypes =& ilObjQuestionPool::_getQuestionTypes(TRUE);
$forbidden_types = $this->object->_getForbiddenQuestionTypes();
$allowedtypes = array();
foreach ($questiontypes as $qt)
{
if (!in_array($qt['question_type_id'], $forbidden_types)) array_push($allowedtypes, $qt['question_type_id']);
}
$allowed->setValue($allowedtypes);
foreach ($questiontypes as $type_name => $qtype)
{
$allowed->addOption(new ilCheckboxOption($type_name, $qtype["question_type_id"]));
}
$allowed->setInfo($this->lng->txt('assf_allowed_questiontypes_desc'));
$form->addItem($allowed);
// manual scoring
$manual = new ilCheckboxGroupInputGUI($this->lng->txt('assessment_log_manual_scoring_activate'), "chb_manual_scoring");
$manscoring = $this->object->_getManualScoring();
$manual->setValue($manscoring);
foreach ($questiontypes as $type_name => $qtype)
{
$manual->addOption(new ilCheckboxOption($type_name, $qtype["question_type_id"]));
}
$manual->setInfo($this->lng->txt('assessment_log_manual_scoring_desc'));
$form->addItem($manual);
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$form->addCommandButton("saveSettings", $this->lng->txt("save"));
}
$this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
}

+ Here is the call graph for this function:

ilObjAssessmentFolderGUI::showLogObject ( )

Called when the a log should be shown.

Definition at line 220 of file class.ilObjAssessmentFolderGUI.php.

References $_POST, $test, and logsObject().

{
$from = mktime($_POST['log_from']['time']['h'], $_POST['log_from']['time']['m'], 0, $_POST['log_from']['date']['m'], $_POST['log_from']['date']['d'], $_POST['log_from']['date']['y']);
$until = mktime($_POST['log_until']['time']['h'], $_POST['log_until']['time']['m'], 0, $_POST['log_until']['date']['m'], $_POST['log_until']['date']['d'], $_POST['log_until']['date']['y']);
$test = $_POST['sel_test'];
$this->logsObject($from, $until, $test);
}

+ Here is the call graph for this function:

Field Documentation

ilObjAssessmentFolderGUI::$conditions

Constructor public.

Definition at line 42 of file class.ilObjAssessmentFolderGUI.php.


The documentation for this class was generated from the following file: