1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
-
- class Activity extends Eloquent
- {
-
- public function section()
- {
- return $this->belongsTo('Section');
- }
-
- public function rubric()
- {
- return $this->belongsTo('Rubric');
- }
-
- public function course()
- {
- return $this->belongsTo('Course');
- }
-
- public function assessed_students()
- {
- return $this->belongsToMany('Student', 'assessments')->withPivot('scores', 'percentage')->withTimestamps();
- }
-
- // cap_array
- public function getCapArrayAttribute($value)
- {
- return json_decode($this->criteria_achieved_percentage, true);
- }
-
- // o_ach_array
- public function getOAchArrayAttribute($value)
- {
- return json_decode($this->outcomes_achieved, true);
- }
-
- // o_att_array
- public function getOAttArrayAttribute($value)
- {
- return json_decode($this->outcomes_attempted, true);
- }
-
- }
|