add assessment feature
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 49s
Tests / PHPUnit (push) Successful in 1m36s

This commit is contained in:
root
2026-09-10 06:44:24 -04:00
parent ac19226bf0
commit b5e719382d
31 changed files with 1712 additions and 65 deletions
+14
View File
@@ -0,0 +1,14 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class AssessmentFormModel extends Model
{
protected $table = 'assessment_forms';
protected $primaryKey = 'id';
protected $returnType = 'array';
protected $allowedFields = ['name', 'pool_id', 'school_year', 'created_by', 'status', 'education_committee_note'];
protected $useTimestamps = true;
}
@@ -0,0 +1,17 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class AssessmentFormQuestionModel extends Model
{
protected $table = 'assessment_form_questions';
// CI's Model API accepts one primary-key field; the database enforces the
// actual composite key (form_id, question_id).
protected $primaryKey = 'form_id';
protected $useAutoIncrement = false;
protected $returnType = 'array';
protected $allowedFields = ['form_id', 'question_id', 'order_index'];
protected $useTimestamps = false;
}
+14
View File
@@ -0,0 +1,14 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class AssessmentQuestionModel extends Model
{
protected $table = 'assessment_questions';
protected $primaryKey = 'id';
protected $returnType = 'array';
protected $allowedFields = ['pool_id', 'type', 'text', 'options', 'correct_answer', 'points', 'order_index'];
protected $useTimestamps = true;
}
+14
View File
@@ -0,0 +1,14 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class QuestionPoolModel extends Model
{
protected $table = 'question_pools';
protected $primaryKey = 'id';
protected $returnType = 'array';
protected $allowedFields = ['name', 'subject_tag', 'created_by'];
protected $useTimestamps = true;
}
+14
View File
@@ -0,0 +1,14 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class StudentAnswerModel extends Model
{
protected $table = 'student_answers';
protected $primaryKey = 'id';
protected $returnType = 'array';
protected $allowedFields = ['student_assessment_id', 'question_id', 'answer_value', 'is_correct', 'points_awarded'];
protected $useTimestamps = true;
}
+14
View File
@@ -0,0 +1,14 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class StudentAssessmentModel extends Model
{
protected $table = 'student_assessments';
protected $primaryKey = 'id';
protected $returnType = 'array';
protected $allowedFields = ['form_id', 'student_id', 'status', 'assigned_at', 'started_at', 'submitted_at', 'graded_at', 'graded_by', 'score', 'education_committee_note'];
protected $useTimestamps = true;
}