Skip to content

Releases: harishdurga/laravel-quiz

Support for Laravel 11

17 Aug 16:02
9bf62f7
Compare
Choose a tag to compare

Support for Laravel 10

03 Jul 17:28
55aec4d
Compare
Choose a tag to compare

Namespace Issue Fixed For Topicable Model

03 Jul 17:10
5cbff06
Compare
Choose a tag to compare

v1.2.1

11 Feb 13:13
27b3395
Compare
Choose a tag to compare

Fixing #34

v1.2.0

02 Feb 15:40
69b6e3a
Compare
Choose a tag to compare

The validate() on the QuizAttempt model fetched answers from the first QuizAttempt rather than the correct QuizAttempt when there are multiple QuizAttempts for the same Quiz. The same was the issue with render methods for the three types of questions. This issue got fixed in this release. The render method signature got updated by passing the QuizAttempt as the second argument and the mixed optional data as the third argument.

Example

public static function renderQuestionType1Answers(QuizQuestion $quizQuestion,QuizAttempt $quizAttempt,mixed $data=null)
    {
        /**
         * @var Question $actualQuestion
         */
        $actualQuestion = $quizQuestion->question;
        $answers = $quizQuestion->answers->where('quiz_attempt_id', $quizAttempt->id);
        $questionOptions = $actualQuestion->options;
        $correctAnswer = $actualQuestion->correct_options()->first()?->option;
        $givenAnswer = $answers->first()?->question_option_id;
        foreach ($questionOptions as $questionOption) {
            if ($questionOption->id == $givenAnswer) {
                $givenAnswer = $questionOption->option;
                break;
            }
        }
        return [$correctAnswer, $givenAnswer];
    }

v1.1.12

23 Jan 17:11
c58465c
Compare
Choose a tag to compare

Package dependencies got updated.

v1.1.11

17 Sep 10:54
dd5dc7e
Compare
Choose a tag to compare

Closed #28 with PR #29

  • Implemented validate() method for QuizAttempt model

v1.1.10

07 Sep 13:31
b681d49
Compare
Choose a tag to compare

Closed #26 with #27

v1.1.9

04 Aug 04:38
fac057d
Compare
Choose a tag to compare

Fixed: #22
PR For Route key and Route model binding: #23
Ex:

//Router
Route::get('/quiz/{quiz}', [QuizController::class, 'edit']);

//Controller
public function edit(Quiz $quiz)
{
    dd($quiz);
}

v1.1.8

01 Aug 16:13
c15e40f
Compare
Choose a tag to compare
  • Fixed #18
  • Now validation needs to be used to keep slugs for topics and quizzes unique instead of unique key constraints on the column.