private function getLoginInfo() { $text = ''; if ($this->modal) { return $text; } $id = Session::currentSUNetID(); if (!$id) { return 'Not logged in.'; } $user = Session::currentPerson(); if (!$user) { return 'No account.'; } $text .= '<span class="loginname">' . $user->getDisplayName() . '</span>'; $pos = Session::defaultPosition(); $text .= "<br />\n" . Session::positionOrTeamName($pos); return $text; }
$view = null; } } if ($position >= POSITION_PLAYER) { switch ($view) { case 'edit': $page->addElement(UIText::exactText(displayClueDetails($clue))->setTitle('Clue Details')); $page->addElement(UIText::exactText(displayClueEditForm($clue))->setTitle('Edit Clue')); break; default: require_js('jquery-1.5.1.min'); require_js('jquery.form'); require_js('checkin'); require_js('answering'); require_js('sjcl'); $team = Session::currentPerson()->getTeam(); if ($team) { $team->doRefreshClueStates(); } $displayed = 0; $clues = Clue::getAllClues(); $curClue = $team ? $team->getCurrentClue() : null; $all_clues = ''; $past_clues = ''; $clueState = $curClue ? $curClue->getClueState($team) : null; $state = $clueState ? $clueState->getState() : STATE_HIDDEN; if ($state >= STATE_UNLOCKED) { $page->addElement(UIText::exactText(displayCurrentClue($curClue, $team, $state))); } else { $page->addElement('No clues are available. Check back soon!'); }
private function isDBRecordEditable() { return in_array(Session::currentPerson()->getID(), arrayize($this->getOwnerID())) || Session::defaultPosition() >= POSITION_ADMIN; }