public function actionFeed()
 {
     if (isset($_GET['start']) && isset($_GET['end'])) {
         $model = new Event('search');
         $collegeId = null;
         if (Yii::app()->user->isStudent()) {
             $student = Student::model()->findByPk(Yii::app()->user->id);
             $collegeId = $student->college_id;
         }
         $events = $model->searchEventsForFeed($collegeId, $_GET['start'], $_GET['end']);
         if (!empty($events)) {
             $eventSources = array();
             foreach ($events as $key => $event) {
                 $eventSources[$key]['id'] = $event['post_item_id'];
                 $eventSources[$key]['title'] = $event['title'];
                 $eventSources[$key]['start'] = $event['start_date'] . ' ' . $event['start_time'];
                 $eventSources[$key]['end'] = $event['end_date'] . ' ' . $event['end_time'];
                 $eventSources[$key]['allDay'] = false;
                 $eventSources[$key]['color'] = $event['event_background_color'];
                 $eventSources[$key]['textColor'] = $event['event_text_color'];
                 $eventSources[$key]['signup'] = 'Public Signup: ' . ($event['college_name'] != null ? $event['college_name'] . ' Only' : 'yes');
                 $eventSources[$key]['url'] = $this->createAbsoluteUrl('view', array('id' => $event['post_item_id']));
             }
             echo CJSON::encode($eventSources);
         }
     }
     Yii::app()->end();
 }