Skip to content

Commit

Permalink
Done with new ui design.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMee committed Mar 1, 2018
1 parent 9b88a66 commit 6117d8a
Show file tree
Hide file tree
Showing 16 changed files with 1,255 additions and 884 deletions.
12 changes: 11 additions & 1 deletion app/CourseRegistered.php
Expand Up @@ -47,12 +47,22 @@ public function viewSelected($data)

$results = $this->where('semester', $data['semester'])
->where('year', $data['year'])
->where('student_id', $data['student_id'])
->get();

return $results;
}

public function viewSelectedForStudent($data)
{

$results = $this->where('semester', $data['semester'])
->where('year', $data['year'])
->where('student_id', $data['student_id'])
->get();

return $results;
}

public function updateRegistration($data)
{
$data['staff_id'] = auth()->id();
Expand Down
14 changes: 14 additions & 0 deletions app/Http/Controllers/CourseRegisteredController.php
Expand Up @@ -104,5 +104,19 @@ public function viewSelectedRegistration(Request $request, CourseRegistered $cou
}
}

public function viewSelectedRegistrationForStudents(Request $request, CourseRegistered $courseRegistered)
{
try
{
$result = $courseRegistered->viewSelectedForStudent($request->all());

return apiSuccess($result);
}
catch (\Exception $e)
{
return apiFailure($e);
}
}


}

0 comments on commit 6117d8a

Please sign in to comment.