Skip to content

Releases: harishdurga/laravel-quiz

Support for Laravel 11

Choose a tag to compare

@harishdurga harishdurga released this 17 Aug 16:02
9bf62f7

Support for Laravel 10

Choose a tag to compare

@harishdurga harishdurga released this 03 Jul 17:28
55aec4d

Namespace Issue Fixed For Topicable Model

Choose a tag to compare

@harishdurga harishdurga released this 03 Jul 17:10
5cbff06

v1.2.1

Choose a tag to compare

@harishdurga harishdurga released this 11 Feb 13:13
27b3395

Fixing #34

v1.2.0

Choose a tag to compare

@harishdurga harishdurga released this 02 Feb 15:40
69b6e3a

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

Choose a tag to compare

@harishdurga harishdurga released this 23 Jan 17:11
c58465c

Package dependencies got updated.

v1.1.11

Choose a tag to compare

@harishdurga harishdurga released this 17 Sep 10:54
dd5dc7e

Closed #28 with PR #29

  • Implemented validate() method for QuizAttempt model

v1.1.10

Choose a tag to compare

@harishdurga harishdurga released this 07 Sep 13:31
b681d49

Closed #26 with #27

v1.1.9

Choose a tag to compare

@harishdurga harishdurga released this 04 Aug 04:38
fac057d

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

Choose a tag to compare

@harishdurga harishdurga released this 01 Aug 16:13
c15e40f
  • Fixed #18
  • Now validation needs to be used to keep slugs for topics and quizzes unique instead of unique key constraints on the column.