19 declare(strict_types=1);
    51         array $environment = null
    53         $trafo = $refinery->custom()->transformation(
    55                 list($mode, $date) = $v;
    56                 if (count($date) < 1) {
    59                     $date = array_shift($date);
    61                 return [(
int) $mode, $date];
    65         $results_time_group = $f->switchableGroup(
    67                 ScoreReportingTypes::SCORE_REPORTING_IMMIDIATLY->value => $f->group([], $lng->
txt(
'tst_results_access_always'), $lng->
txt(
'tst_results_access_always_desc')),
    68                 ScoreReportingTypes::SCORE_REPORTING_FINISHED->value => $f->group([], $lng->
txt(
'tst_results_access_finished'), $lng->
txt(
'tst_results_access_finished_desc')),
    69                 ScoreReportingTypes::SCORE_REPORTING_AFTER_PASSED->value => $f->group([], $lng->
txt(
'tst_results_access_passed'), $lng->
txt(
'tst_results_access_passed_desc')),
    70                 ScoreReportingTypes::SCORE_REPORTING_DATE->value => $f->group(
    72                     $f->dateTime($lng->
txt(
'tst_reporting_date'), 
"")
    73                         ->withTimezone($environment[
'user_time_zone'])
    74                         ->withFormat($environment[
'user_date_format'])
    83                     $lng->
txt(
'tst_results_access_date'),
    84                     $lng->
txt(
'tst_results_access_date_desc')
    87             $lng->
txt(
'tst_results_access_setting'),
    91         ->withAdditionalTransformation($trafo);
    93         if ($this->
getScoreReporting() !== ScoreReportingTypes::SCORE_REPORTING_DISABLED) {
    94             $results_time_group = $results_time_group->withValue($this->
getScoreReporting()->value);
    98         $optional_group = $f->optionalGroup(
   100                 'score_reporting_mode' => $results_time_group,
   101                 'show_grading_status' => $f->checkbox(
   102                     $lng->
txt(
'tst_results_grading_opt_show_status'),
   103                     $lng->
txt(
'tst_results_grading_opt_show_status_desc')
   105                 'show_grading_mark' => $f->checkbox(
   106                     $lng->
txt(
'tst_results_grading_opt_show_mark'),
   107                     $lng->
txt(
'tst_results_grading_opt_show_mark_desc')
   109                 'show_pass_details' => $f->checkbox(
   110                     $lng->
txt(
'tst_results_grading_opt_show_details'),
   111                     $lng->
txt(
'tst_results_grading_opt_show_details_desc')
   113                 'pass_deletion_allowed' => $f->checkbox(
   114                     $lng->
txt(
'tst_pass_deletion'),
   115                     $lng->
txt(
'tst_pass_deletion_allowed')
   118             $lng->
txt(
'tst_results_access_enabled'),
   119             $lng->
txt(
'tst_results_access_enabled_desc')
   123             $optional_group = $optional_group->withValue(
   133             $optional_group = $optional_group->withValue(null);
   136         $fields = [
'score_reporting' => $optional_group];
   137         return $f->section($fields, $lng->
txt(
'test_results'))
   139                 $refinery->custom()->transformation(
   141                         $settings = clone $this;
   144                         if ($v[
'score_reporting']) {
   145                             list($mode, $date) = $v[
'score_reporting'][
'score_reporting_mode'];
   146                             $settings = $settings
   147                                 ->withShowGradingStatusEnabled($v[
'score_reporting'][
'show_grading_status'])
   148                                 ->withShowGradingMarkEnabled($v[
'score_reporting'][
'show_grading_mark'])
   149                                 ->withShowPassDetails($v[
'score_reporting'][
'show_pass_details'])
   150                                 ->withPassDeletionAllowed($v[
'score_reporting'][
'pass_deletion_allowed'])
   155                             ->withReportingDate($date);
   171             'reporting_date' => [
'text', (string) $dat],
   180             case ScoreReportingTypes::SCORE_REPORTING_DISABLED:
   184             case ScoreReportingTypes::SCORE_REPORTING_FINISHED:
   189             case ScoreReportingTypes::SCORE_REPORTING_IMMIDIATLY:
   194             case ScoreReportingTypes::SCORE_REPORTING_DATE:
   199             case ScoreReportingTypes::SCORE_REPORTING_AFTER_PASSED:
   229         $clone = clone $this;
   240         $clone = clone $this;
   251         $clone = clone $this;
   262         $clone = clone $this;
   273         $clone = clone $this;
   284         $clone = clone $this;
   285         $clone->show_pass_details = $flag;
 
toForm(\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment=null)
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
withScoreReporting(ScoreReportingTypes $score_reporting)
 
getShowGradingStatusEnabled()
 
toLog(AdditionalInformationGenerator $additional_info)
 
withReportingDate(?\DateTimeImmutable $reporting_date)
 
__construct(int $test_id)
 
withShowGradingMarkEnabled(bool $show_grading_mark)
 
withPassDeletionAllowed(bool $pass_deletion_allowed)
 
ScoreReportingTypes $score_reporting
 
withShowGradingStatusEnabled(bool $show_grading_status)
 
bool $show_grading_status
 
bool $pass_deletion_allowed
 
withShowPassDetails(bool $flag)
 
getShowGradingMarkEnabled()
 
bool $show_pass_details
this is derived from results_presentation with RESULTPRES_BIT_PASS_DETAILS; see ilObjTestSettingsResu...
 
__construct(Container $dic, ilPlugin $plugin)
 
getLogEntriesForScoreReportingEnabled(AdditionalInformationGenerator $additional_info)
 
const STORAGE_DATE_FORMAT
 
DateTimeImmutable $reporting_date