コード例 #1
0
ファイル: ClueState.php プロジェクト: rjwalsh88/BawkApp
 public function getClue()
 {
     if ($this->clueObj == UNPREPARED) {
         $this->clueObj = Clue::getClue($this->clue);
     }
     return $this->clueObj;
 }
コード例 #2
0
ファイル: clues.php プロジェクト: rjwalsh88/BawkApp
        $form_data = coagulateLocs($form_data, array('start', 'hint', 'answer'));
        $clue->makeChanges($form_data);
        $clue->doUpdate('Edited clue successfully.');
        break;
    case 'delete':
        $clue = Clue::getClue($clue_id);
        foreach ($clue->getClueStates() as $clueState) {
            $clueState->doRemove();
        }
        $clue->doRemove('Deleted clue successfully.');
        break;
    case 'answer':
        $team = Session::currentTeam();
        if ($team) {
            if ($latitude && $longitude) {
                $clue = Clue::getClue($clue_id);
                if ($clue) {
                    CheckIn::doCheckIn($team, $latitude, $longitude, $guess);
                    $team->doGuessAnswer($clue, $guess);
                }
            } else {
                add_notification('You must have location turned on to submit clue answers.');
            }
        } else {
            add_notification('You must have a team to submit clue answers.');
        }
}
// VIEW
$page = new UIPage();
$position = Session::defaultPosition();
function answerForm($clueID, $clueSalt, $hashedAnswers, $serialized)