partial fix for teacher class progress
API CI/CD / Validate (composer + pint) (push) Successful in 3m9s
API CI/CD / Test (PHPUnit) (push) Failing after 5m6s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 49s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 3m9s
API CI/CD / Test (PHPUnit) (push) Failing after 5m6s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 49s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -10,7 +10,7 @@ class SubjectCurriculum extends BaseModel
|
||||
{
|
||||
protected $table = 'subject_curriculum_items';
|
||||
|
||||
protected $fillable = ['class_id', 'subject', 'unit_number', 'unit_title', 'chapter_name', 'created_at', 'updated_at'];
|
||||
protected $fillable = ['class_id', 'school_year', 'subject', 'unit_number', 'unit_title', 'chapter_name', 'created_at', 'updated_at'];
|
||||
|
||||
public $timestamps = true;
|
||||
|
||||
@@ -54,7 +54,11 @@ class SubjectCurriculum extends BaseModel
|
||||
return $q;
|
||||
}
|
||||
|
||||
return $q->where('school_year', $schoolYear);
|
||||
return $q->where(function (Builder $yearQuery) use ($schoolYear) {
|
||||
$yearQuery->where('school_year', $schoolYear)
|
||||
->orWhereNull('school_year')
|
||||
->orWhere('school_year', '');
|
||||
});
|
||||
}
|
||||
|
||||
public function scopeOrdered(Builder $q): Builder
|
||||
|
||||
Reference in New Issue
Block a user