Does anyone have an answer for this problem? Or an alternative for this issue?
Mar 17, 2017
2
Level 6
Last 5 evaluations
Hello,
I'm building an app that will be used to evaluate students by different courses.
When I make a new evaluation of a selected course, I want to be able to show the 5 previous evaluations of that course.
I suppose I would need a special scope-like method in my 'Student' model, named 'last5evals' that receives the course id. Then I can call this method in the evaluation view:
$evaluation->student->last5evals($course_id);
That would return an array like {'A','C','A','B','B') which I can show in the view.
Is that possible or it there another way to reach my goal?
Thank you!
Please or to participate in this conversation.