Beispiel #1
0
 public static function postProcessCuePoints($liveEntry, $cuePointsIds = null)
 {
     $select = new Criteria();
     if ($cuePointsIds) {
         $select->add(CuePointPeer::ID, $cuePointsIds, Criteria::IN);
     } else {
         /* @var $liveEntry LiveEntry */
         $select->add(CuePointPeer::ENTRY_ID, $liveEntry->getId());
         $select->add(CuePointPeer::STATUS, CuePointStatus::READY);
         $cuePoints = CuePointPeer::doSelect($select);
         $cuePointsIds = array();
         foreach ($cuePoints as $cuePoint) {
             /* @var $cuePoint CuePoint */
             $cuePointsIds[] = $cuePoint->getId();
         }
     }
     $update = new Criteria();
     $update->add(CuePointPeer::STATUS, CuePointStatus::HANDLED);
     $con = Propel::getConnection(MetadataPeer::DATABASE_NAME);
     BasePeer::doUpdate($select, $update, $con);
     $cuePoints = CuePointPeer::retrieveByPKs($cuePointsIds);
     foreach ($cuePoints as $cuePoint) {
         /* @var $cuePoint CuePoint */
         $cuePoint->indexToSearchIndex();
     }
 }
Beispiel #2
0
 protected function getQuizQuestionPercentageTableReport($objectIds, $orderBy)
 {
     $questionIds = explode(",", $objectIds);
     $questions = CuePointPeer::retrieveByPKs($questionIds);
     return $this->getAggregateDataForQuestions($questions, $orderBy);
 }