4include_once 
"./Modules/Test/classes/inc.AssessmentConstants.php";
 
    5include_once 
"./Modules/Test/classes/class.ilTestServiceGUI.php";
 
   36        parent::__construct($a_object);
 
   42    protected function buildSubTabs($active_sub_tab = 
'man_scoring_by_qst')
 
   49        $ilTabs->addSubTab(
'man_scoring_by_qst', $this->lng->txt(
'tst_man_scoring_by_qst'), $this->ctrl->getLinkTargetByClass(
'ilTestScoringByQuestionsGUI', 
'showManScoringByQuestionParticipantsTable'));
 
   50        $ilTabs->addSubTab(
'man_scoring', $this->lng->txt(
'tst_man_scoring_by_part'), $this->ctrl->getLinkTargetByClass(
'ilTestScoringGUI', 
'showManScoringParticipantsTable'));
 
   51        $ilTabs->setSubTabActive($active_sub_tab);
 
   60        if (!isset(
$_GET[
'active_id']) || !(
int) 
$_GET[
'active_id']) {
 
   63            $ilCtrl->redirectByClass(
"ilobjtestgui", 
"infoScreen");
 
   65            $activeId = (int) 
$_GET[
'active_id'];
 
   75        $maxPass = $this->
object->_getMaxPass($activeId);
 
   76        if (isset(
$_GET[
"pass"]) && 0 <= (
int) 
$_GET[
"pass"] && $maxPass >= (
int) 
$_GET[
"pass"]) {
 
   81            $pass = $this->
object->_getResultPass($activeId);
 
   94        if (!$ilAccess->checkAccess(
"write", 
"", $this->ref_id)) {
 
   97            $this->ctrl->redirectByClass(
"ilobjtestgui", 
"infoScreen");
 
  100        require_once 
'Modules/Test/classes/class.ilObjAssessmentFolder.php';
 
  104            $this->ctrl->redirectByClass(
"ilobjtestgui", 
"infoScreen");
 
  107        $cmd = $this->ctrl->getCmd();
 
  108        $next_class = $this->ctrl->getNextClass($this);
 
  110        if (strlen($cmd) == 0) {
 
  111            $this->ctrl->redirect($this, 
"manscoring");
 
  115        $this->buildSubTabs(
'man_scoring');
 
  116        switch ($next_class) {
 
  118                $ret =&$this->$cmd();
 
  131        $tpl->setContent(
$table->getHTML());
 
  139        $table->writeFilterToSession();
 
  164        require_once 
'Modules/Test/classes/tables/class.ilTestPassManualScoringOverviewTableGUI.php';
 
  167        $userId = $this->
object->_getUserIdFromActiveId($activeId);
 
  168        $userFullname = $this->
object->userLookupFullName($userId, 
false, 
true);
 
  169        $tableTitle = 
sprintf(
$lng->txt(
'tst_pass_overview_for_participant'), $userFullname);
 
  170        $table->setTitle($tableTitle);
 
  172        $passOverviewData = $this->service->getPassOverviewData($activeId);
 
  173        $table->setData($passOverviewData[
'passes']);
 
  175        $contentHTML .= 
$table->getHTML() . 
'<br />';
 
  179        if (
$form === 
null) {
 
  180            $questionGuiList = $this->service->getManScoringQuestionGuiList($activeId, 
$pass);
 
  184        $contentHTML .= 
$form->getHTML();
 
  188        $tpl->setContent($contentHTML);
 
  202        $questionGuiList = $this->service->getManScoringQuestionGuiList($activeId, 
$pass);
 
  205        $form->setValuesByPost();
 
  207        if (!
$form->checkInput()) {
 
  213        include_once 
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
 
  215        $maxPointsByQuestionId = array();
 
  216        $maxPointsExceeded = 
false;
 
  217        foreach ($questionGuiList as $questionId => $questionGui) {
 
  218            $reachedPoints = 
$form->getItemByPostVar(
"question__{$questionId}__points")->getValue();
 
  221            if ($reachedPoints > $maxPoints) {
 
  222                $maxPointsExceeded = 
true;
 
  224                $form->getItemByPostVar(
"question__{$questionId}__points")->setAlert(
sprintf(
 
  225                    $lng->txt(
'tst_manscoring_maxpoints_exceeded_input_alert'),
 
  230            $maxPointsByQuestionId[$questionId] = $maxPoints;
 
  233        if ($maxPointsExceeded) {
 
  239        include_once 
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
 
  241        foreach ($questionGuiList as $questionId => $questionGui) {
 
  242            $reachedPoints = 
$form->getItemByPostVar(
"question__{$questionId}__points")->getValue();
 
  248                $maxPointsByQuestionId[$questionId],
 
  251                $this->object->areObligationsEnabled()
 
  255                $form->getItemByPostVar(
"question__{$questionId}__feedback")->getValue(),
 
  260            $this->
object->saveManualFeedback($activeId, $questionId, 
$pass, $feedback);
 
  262            $notificationData[$questionId] = array(
 
  263                'points' => $reachedPoints, 
'feedback' => $feedback
 
  267        include_once 
"./Modules/Test/classes/class.ilObjTestAccess.php";
 
  268        include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
 
  270            $this->object->getId(),
 
  274        $manScoringDone = 
$form->getItemByPostVar(
"manscoring_done")->getChecked();
 
  277        $manScoringNotify = 
$form->getItemByPostVar(
"manscoring_notify")->getChecked();
 
  278        if ($manScoringNotify) {
 
  279            require_once 
'Modules/Test/classes/notifications/class.ilTestManScoringParticipantNotification.php';
 
  282                $this->object->_getUserIdFromActiveId($activeId),
 
  283                $this->object->getRefId()
 
  286            $notification->setAdditionalInformation(array(
 
  287                'test_title' => $this->object->getTitle(),
 
  288                'test_pass' => 
$pass + 1,
 
  289                'questions_gui_list' => $questionGuiList,
 
  290                'questions_scoring_data' => $notificationData
 
  293            $notification->send();
 
  296        require_once 
'./Modules/Test/classes/class.ilTestScoring.php';
 
  298        $scorer->setPreserveManualScores(
true);
 
  299        $scorer->recalculateSolutions();
 
  301        if ($this->object->getAnonymity() == 0) {
 
  303            $name_real_or_anon          = $user_name[
'firstname'] . 
' ' . $user_name[
'lastname'];
 
  305            $name_real_or_anon          = 
$lng->txt(
'anonymous');
 
  308        if ($redirect == 
true) {
 
  309            $ilCtrl->redirect($this, 
'showManScoringParticipantScreen');
 
  326                if ($participant[
'active_id'] == 
$_GET[
'active_id']) {
 
  334                $ilCtrl->redirect($this, 
'showManScoringParticipantScreen');
 
  337            $ilCtrl->redirectByClass(
"iltestscoringgui", 
"showManScoringParticipantsTable");
 
  346            $ilCtrl->redirectByClass(
"iltestscoringgui", 
"showManScoringParticipantsTable");
 
  354        require_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
  355        require_once 
'Services/Form/classes/class.ilFormSectionHeaderGUI.php';
 
  356        require_once 
'Services/Form/classes/class.ilCustomInputGUI.php';
 
  357        require_once 
'Services/Form/classes/class.ilCheckboxInputGUI.php';
 
  358        require_once 
'Services/Form/classes/class.ilTextInputGUI.php';
 
  359        require_once 
'Services/Form/classes/class.ilTextAreaInputGUI.php';
 
  361        $ilCtrl->setParameter($this, 
'active_id', $activeId);
 
  368        $form->setTableWidth(
'100%');
 
  370        foreach ($questionGuiList as $questionId => $questionGUI) {
 
  371            $questionHeader = 
sprintf(
$lng->txt(
'tst_manscoring_question_section_header'), $questionGUI->object->getTitle());
 
  372            $questionSolution = $questionGUI->getSolutionOutput($activeId, 
$pass, 
false, 
false, 
true, 
false, 
false, 
true);
 
  373            $bestSolution = $questionGUI->object->getSuggestedSolutionOutput();
 
  376            $sect->setTitle($questionHeader . 
' [' . $this->lng->txt(
'question_id_short') . 
': ' . $questionGUI->object->getId() . 
']');
 
  377            $form->addItem($sect);
 
  380            $cust->setHtml($questionSolution);
 
  381            $form->addItem($cust);
 
  389            $nonedit = 
new ilNonEditableValueGUI(
$lng->txt(
'tst_manscoring_input_max_points_for_question'), 
"question__{$questionId}__maxpoints");
 
  393            $form->addItem($nonedit);
 
  396            $area->setUseRTE(
true);
 
  398                $area->setValue($this->object->getManualFeedback($activeId, $questionId, 
$pass));
 
  400            $form->addItem($area);
 
  402            if (strlen(trim($bestSolution))) {
 
  404                $cust->setHtml($bestSolution);
 
  405                $form->addItem($cust);
 
  410        $sect->setTitle(
$lng->txt(
'tst_participant'));
 
  411        $form->addItem($sect);
 
  415            $check->setChecked(
true);
 
  417        $form->addItem($check);
 
  420        $form->addItem($check);
 
  422        $form->addCommandButton(
'saveManScoringParticipantScreen', 
$lng->txt(
'save'));
 
  423        $form->addCommandButton(
'saveReturnManScoringParticipantScreen', 
$lng->txt(
'save_return'));
 
  424        $form->addCommandButton(
'saveNextManScoringParticipantScreen', 
$lng->txt(
'save_and_next'));
 
  438        require_once 
'Modules/Test/classes/tables/class.ilTestManScoringParticipantsTableGUI.php';
 
  442            $participantStatusFilterValue = 
$table->getFilterItemByPostVar(
'participant_status')->getValue();
 
  443            $table->setData($this->object->getTestParticipantsForManualScoring($participantStatusFilterValue));
 
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
static _getReachedPoints($active_id, $question_id, $pass=null)
Returns the points, a learner has reached answering the question.
static _getMaximumPoints($question_id)
Returns the maximum points, a learner can reach answering the question.
static _setReachedPoints($active_id, $question_id, $points, $maxpoints, $pass, $manualscoring, $obligationsEnabled)
Sets the points, a learner has reached answering the question Additionally objective results are upda...
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
This class represents a non editable value in a property form.
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
static _mananuallyScoreableQuestionTypesExists()
Returns the fact wether manually scoreable question types exist or not.
static _getParticipantId($active_id)
Get user id for active id.
static _lookupName($a_user_id)
lookup user name
sendManScoringParticipantNotification()
fetchPassParameter($activeId)
executeCommand()
execute command
buildManScoringParticipantsTable($withData=false)
saveNextManScoringParticipantScreen()
const PART_FILTER_ALL_USERS
saveManScoringParticipantScreen($redirect=true)
__construct(ilObjTest $a_object)
ilTestScoringGUI constructor
const PART_FILTER_MANSCORING_NONE
const PART_FILTER_INACTIVE_ONLY
resetManScoringParticipantsFilter()
const PART_FILTER_ACTIVE_ONLY
applyManScoringParticipantsFilter()
buildManScoringParticipantForm($questionGuiList, $activeId, $pass, $initValues=false)
const PART_FILTER_MANSCORING_DONE
showManScoringParticipantsTable()
saveReturnManScoringParticipantScreen()
showManScoringParticipantScreen(ilPropertyFormGUI $form=null)
Service GUI class for tests.
getCommand($cmd)
Retrieves the ilCtrl command.
static setManScoringDone($activeId, $manScoringDone)
stores the flag wether manscoring is done for the given test active or not within the global settings...
static isManScoringDone($activeId)
reads the flag wether manscoring is done for the given test active or not from the global settings (s...
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
if(empty($password)) $table
if(isset($_POST['submit'])) $form