Skip to content

Commit 91c7ac1

Browse files
committed
Allow marking questions as needs review
This allows users to mark questions as in need of review or refactoring (without invalidating them) which results in a front-end notice to other users. Closes #732
1 parent 62e1977 commit 91c7ac1

12 files changed

+68
-19
lines changed

app/Models/Question.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Question extends Model
99
{
1010
use HasFactory;
1111

12-
protected $fillable = ['text', 'hint', 'comment', 'correct_answer_id', 'type', 'is_invalid'];
12+
protected $fillable = ['text', 'hint', 'comment', 'correct_answer_id', 'type', 'is_invalid', 'needs_review'];
1313

1414
public function answers()
1515
{
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class () extends Migration {
8+
public function up(): void
9+
{
10+
Schema::table('questions', function (Blueprint $table) {
11+
$table->boolean('needs_review')->default(false);
12+
});
13+
}
14+
15+
public function down(): void
16+
{
17+
Schema::table('', function (Blueprint $table) {
18+
//
19+
});
20+
}
21+
};

public/build/assets/DeckForm-pGvnpxH6.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)