public function modulesActiveOn($periodId)
    {
        $courses = $this->coursesActiveOn($periodId)->pluck('course_id');
        return StudyModule::whereHas('modulesByPeriod.courses', function ($query) use ($courses)  {
            $query->whereIn('course_id',$courses);
        });
    }
public function modulesActiveOn($periodId)
    {
        $courses = $this->coursesActiveOn($periodId)->pluck('course_id');
        return StudyModule::whereHas('modulesByPeriod.courses', function ($query) use ($courses)  {
            $query->whereIn('course_id',$courses);
        });
    }
public function modulesActiveOn ( $ periodId ) { $ courses = $ this -> coursesActiveOn ( $ periodId ) -> pluck ( 'course_id' ) ; return StudyModule :: whereHas ( 'modulesByPeriod.courses' , function ( $ query ) use ( $ courses ) { $ query -> whereIn ( 'course_id' , $ courses ) ; } ) ; }
Get the active study modules for this study on period id.
Get the active study modules for this study on period id .