Skip to content

Add default timeout control to quiz header with batch apply#55

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-quiz-header-timeout-options
Draft

Add default timeout control to quiz header with batch apply#55
Copilot wants to merge 3 commits intomainfrom
copilot/add-quiz-header-timeout-options

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 19, 2026

Question timeouts are currently managed individually per question. This adds a default timeout field to the quiz header that can be applied to all questions at once.

Changes

  • Model: Added optional DefaultTimeout property to QuestionSet (nullable for backward compatibility)
  • UI: New quiz header section with timeout input (HTML min validation) and "Apply to All Questions" button with toast feedback
  • Logic: Batch update method validates input and applies timeout to all questions
// New property on QuestionSet
[JsonPropertyName("defaultTimeout")]
public int? DefaultTimeout { get; set; }

// UI interaction
private void ApplyDefaultTimeoutToAllQuestions()
{
    if (_questionSet?.DefaultTimeout > 0)
    {
        foreach (var question in _questions)
            question.Timeout = _questionSet.DefaultTimeout.Value;
        toastService.ShowSuccess($"Applied timeout of {_questionSet.DefaultTimeout.Value}s to {_questions.Count} questions.");
    }
    else
        toastService.ShowError("Please enter a valid timeout value (greater than 0).");
}

Individual question timeouts remain independently editable.

Original prompt

This section details on the original issue you should resolve

<issue_title>Ability to change timeout for all questions at once (eg. default value, or override all)</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

@fortunkam The question timeouts are specific to each question, allow them to be changed in the quiz header.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 19, 2026 16:10
…s button

Co-authored-by: fortunkam <1851394+fortunkam@users.noreply.github.com>
… extract helper method

Co-authored-by: fortunkam <1851394+fortunkam@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ability to change timeout for all questions in quiz header Add default timeout control to quiz header with batch apply Jan 19, 2026
Copilot AI requested a review from fortunkam January 19, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to change timeout for all questions at once (eg. default value, or override all)

2 participants