fix score submission, and class progress

This commit is contained in:
root
2026-04-04 17:44:40 -04:00
parent d158650be9
commit 05dad52e10
4 changed files with 75 additions and 36 deletions
+2 -2
View File
@@ -1287,14 +1287,14 @@ class ScoreController extends Controller
public function viewStudentScore()
{
$parentId = session()->get('user_id');
$userType = $_SESSION['user_type'];
$userType = session()->get('user_type') ?? '';
$firstParentId = null;
$releaseFall = $this->getParentScoresReleasedForSemester('Fall');
$releaseSpring = $this->getParentScoresReleasedForSemester('Spring');
$releaseAny = $releaseFall || $releaseSpring;
// Identify the firstparent based on user type
if ($userType === 'primary') {
if ($userType === 'primary' || $userType === '') {
$firstParentId = $parentId;
} elseif ($userType === 'secondary') {
$parentData = $this->db->table('parents')