public function time_remaining($starttime) {
        $timeleft = $starttime + $this->properties->timelimit - time();
        $hours = floor($timeleft/3600);
        $timeleft = $timeleft - ($hours * 3600);
        $minutes = floor($timeleft/60);
        $secs = $timeleft - ($minutes * 60);

        if ($minutes < 10) {
            $minutes = "0$minutes";
        }
        if ($secs < 10) {
            $secs = "0$secs";
        }
        $output   = array();
        $output[] = $hours;
        $output[] = $minutes;
        $output[] = $secs;
        $output = implode(':', $output);
        return $output;
    }
public function time_remaining($starttime) {
        $timeleft = $starttime + $this->properties->timelimit - time();
        $hours = floor($timeleft/3600);
        $timeleft = $timeleft - ($hours * 3600);
        $minutes = floor($timeleft/60);
        $secs = $timeleft - ($minutes * 60);

        if ($minutes < 10) {
            $minutes = "0$minutes";
        }
        if ($secs < 10) {
            $secs = "0$secs";
        }
        $output   = array();
        $output[] = $hours;
        $output[] = $minutes;
        $output[] = $secs;
        $output = implode(':', $output);
        return $output;
    }
public function time_remaining ( $ starttime ) { $ timeleft = $ starttime + $ this -> properties -> timelimit - time ( ) ; $ hours = floor ( $ timeleft / 3600 ) ; $ timeleft = $ timeleft - ( $ hours * 3600 ) ; $ minutes = floor ( $ timeleft / 60 ) ; $ secs = $ timeleft - ( $ minutes * 60 ) ; if ( $ minutes < 10 ) { $ minutes = "0$minutes" ; } if ( $ secs < 10 ) { $ secs = "0$secs" ; } $ output = array ( ) ; $ output [ ] = $ hours ; $ output [ ] = $ minutes ; $ output [ ] = $ secs ; $ output = implode ( ':' , $ output ) ; return $ output ; }
Returns the time a user has remaining on this lesson
@param int $starttime Starttime timestamp
@return string
Returns the time a user has remaining on this lesson