Problem/Motivation

Whatever the value of backwards_navigation is in quiz settings, the overview displays "Allowed". The same is produced with "time_limit" which is never empty.

Steps to reproduce

Play with the backwards_navigation value and then display the quiz.

Proposed resolution

The problem comes from QuizViewBuilder around line 165

    $stats[] = [
      ['header' => TRUE, 'data' => $this->t('Backwards navigation')],
      $quiz->get('backwards_navigation') ? $this->t('Allowed') : $this->t('Forbidden'),
    ];

$quiz->get('backwards_navigation') should be $quiz->get('backwards_navigation')->value

    if (!$quiz->get('time_limit')->isEmpty()) {
      $stats[] = [
        ['header' => TRUE, 'data' => $this->t('Time limit')],
        _quiz_format_duration($quiz->get('time_limit')->value),
      ];
    }

The test should be on the value if ($quiz->get('time_limit')->value) not on the field.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork quiz-3608043

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

erwangel created an issue. See original summary.

erwangel’s picture

Issue summary: View changes
smustgrave’s picture

Status: Active » Fixed

Planning an alpha release soon of 8.0.x and will include.

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.