Admin: manual scoring for open-ended questions
This commit is contained in:
@@ -8,11 +8,15 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
#[Fillable(['attempt_id', 'question_id', 'option_id', 'text_content'])]
|
||||
#[Fillable(['attempt_id', 'question_id', 'option_id', 'text_content', 'score'])]
|
||||
class Answer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $casts = [
|
||||
'score' => 'float',
|
||||
];
|
||||
|
||||
public function attempt(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Attempt::class);
|
||||
|
||||
Reference in New Issue
Block a user