\QuizAnswersController

QuizAnswersController

Add your application-wide methods in the class below, your controllers will inherit them.

Summary

Methods
Properties
Constants
isAbleTo()
isAbleToAnswer()
changeBooleansToNumbers()
converter()
beforeFilter()
test_mode()
start()
view()
confirm()
grading()
no_more_answer()
$uses
$components
$helpers
No constants found
_sorted()
_getQuizKeyFromPass()
_getQuizEditSessionIndex()
_getQuizKey()
_getActionUrl()
No protected properties found
N/A
No private methods found
$__quiz
$__ableToAnswerAction
N/A

Properties

$uses

$uses : array

use model

Type

array

$components

$components : array

use components

Type

array

$helpers

$helpers : 

use helpers

Type

$__quiz

$__quiz : 

target quiz data

Type

$__ableToAnswerAction

$__ableToAnswerAction : 

target isAbleToAnswer Action

Type

Methods

isAbleTo()

isAbleTo(array  $quiz) : boolean

isAbleTo Whether access to survey of the specified ID Forced URL hack guard And against the authority of the state of the specified questionnaire respondents put a guard It is not in the public state Out of period Stopped Repeatedly answer You are not logged in to not forgive other than member

Parameters

array $quiz

対象となる小テスト

Returns

boolean

isAbleToAnswer()

isAbleToAnswer(array  $quiz) : boolean

isAbleToAnswer 指定されたIDに回答できるかどうか 強制URLハックのガード 指定のアンケートの状態と回答者の権限を照らし合わせてガードをかける 公開状態にない 期間外 停止中 繰り返し回答 会員以外には許してないのに未ログインである

Parameters

array $quiz

対象となる小テスト

Returns

boolean

changeBooleansToNumbers()

changeBooleansToNumbers(array  $data) : array

changeBooleansToNumbers method to change the Boolean value of a given array to 0,1

Parameters

array $data

data array

Returns

array

converter()

converter(  $value, string  $key) : void

__converter method to change the Boolean value to 0,1

Parameters

$value
string $key

key

beforeFilter()

beforeFilter() : void

beforeFilter NetCommonsお約束:できることならControllerのbeforeFilterで実行可/不可の判定して流れを変える

test_mode()

test_mode() : void

test_mode

テストモード回答のとき、一番最初に表示するページ 一覧表示画面で「テスト」ボタンがここへ誘導するようになっている。 どのようなアンケートであるのかの各種属性設定をわかりやすくまとめて表示する表紙的な役割を果たす。

あくまで作成者の便宜のために表示しているものであるので、最初のページだったら必ずここを表示といったような 強制的redirectなどは設定しない。なので強制URL-Hackしたらこの画面をスキップすることだって可能。 作成者への「便宜」のための親切心ページなのでスキップしたい人にはそうさせてあげるのでよいと考える。

start()

start() : void

start

一番最初に表示するページ

view()

view() : void

view method Display the question of the questionnaire , to accept the answer input

confirm()

confirm() : void

confirm method

grading()

grading() : void

grading method

Throws

\ForbiddenException

no_more_answer()

no_more_answer() : void

no_more_answer method 条件によって回答できないアンケートにアクセスしたときに表示

_sorted()

_sorted(array  $obj) : array

_sorted method to sort a given array by key

Parameters

array $obj

data array

Returns

array —

ソート後配列

_getQuizKeyFromPass()

_getQuizKeyFromPass() : string

_getQuizKeyFromPass

Returns

string

_getQuizEditSessionIndex()

_getQuizEditSessionIndex() : string

_getQuizEditSessionIndex

Returns

string

_getQuizKey()

_getQuizKey(array  $quiz) : string

_getQuizKey

Parameters

array $quiz

Quiz data

Returns

string

_getActionUrl()

_getActionUrl(string  $method) : void

_getActionUrl method

Parameters

string $method

遷移先アクション名