src/Events/FeedbackSubmitted.php
private function timeSelector($attempt) {

        $retValue = time();
        if (!empty($attempt->timemodified)) {
            $retValue = $attempt->timemodified;
        } else if (!empty($attempt->timefinished)) {
            $retValue = $attempt->timefinished;
        } else if (!empty($attempt->timestarted)) {
            $retValue = $attempt->timestarted;
        }

        return $retValue;
    }
private function timeSelector($attempt) {

        $retValue = time();
        if (!empty($attempt->timemodified)) {
            $retValue = $attempt->timemodified;
        } else if (!empty($attempt->timefinished)) {
            $retValue = $attempt->timefinished;
        } else if (!empty($attempt->timestarted)) {
            $retValue = $attempt->timestarted;
        }

        return $retValue;
    }
private function timeSelector ( $ attempt ) { $ retValue = time ( ) ; if ( ! empty ( $ attempt -> timemodified ) ) { $ retValue = $ attempt -> timemodified ; } else if ( ! empty ( $ attempt -> timefinished ) ) { $ retValue = $ attempt -> timefinished ; } else if ( ! empty ( $ attempt -> timestarted ) ) { $ retValue = $ attempt -> timestarted ; } return $ retValue ; }
Checks to see which time element in $attempt is valid and if none are available
returns time()
@param $attempt
@return int
Checks to see which time element in $attempt is valid and if none are available returns time ()