ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilSessionReminder Class Reference
+ Collaboration diagram for ilSessionReminder:

Public Member Functions

 calculateSecondsUntilExpiration ()
 
 calculateSecondsUntilReminder ()
 
 isActive ()
 
 setUser ($user)
 
 getUser ()
 
 setCurrentTime ($current_time)
 
 getCurrentTime ()
 
 setExpirationTime ($expiration_time)
 
 getExpirationTime ()
 
 setLeadTime ($lead_time)
 
 getLeadTime ()
 
 setSecondsUntilExpiration ($seconds_until_expiration)
 
 getSecondsUntilExpiration ()
 
 setSecondsUntilReminder ($seconds_until_reminder)
 
 getSecondsUntilReminder ()
 

Data Fields

const MIN_LEAD_TIME = 2
 
const SUGGESTED_LEAD_TIME = 5
 

Protected Member Functions

 __construct ()
 Constructor. More...
 
 isEnoughtTimeLeftForReminder ()
 

Protected Attributes

 $user
 
 $lead_time = 0
 
 $expiration_time = 0
 
 $current_time = 0
 
 $seconds_until_expiration = 0
 
 $seconds_until_reminder = 0
 

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 9 of file class.ilSessionReminder.php.

Constructor & Destructor Documentation

◆ __construct()

ilSessionReminder::__construct ( )
protected

Constructor.

Definition at line 55 of file class.ilSessionReminder.php.

56 {
57 }

Member Function Documentation

◆ calculateSecondsUntilExpiration()

ilSessionReminder::calculateSecondsUntilExpiration ( )

Definition at line 98 of file class.ilSessionReminder.php.

99 {
101 }
setSecondsUntilExpiration($seconds_until_expiration)

References getCurrentTime(), getExpirationTime(), and setSecondsUntilExpiration().

+ Here is the call graph for this function:

◆ calculateSecondsUntilReminder()

ilSessionReminder::calculateSecondsUntilReminder ( )

Definition at line 106 of file class.ilSessionReminder.php.

References getLeadTime(), getSecondsUntilExpiration(), and setSecondsUntilReminder().

+ Here is the call graph for this function:

◆ getCurrentTime()

ilSessionReminder::getCurrentTime ( )
Returns
int

Definition at line 178 of file class.ilSessionReminder.php.

References $current_time.

Referenced by calculateSecondsUntilExpiration().

+ Here is the caller graph for this function:

◆ getExpirationTime()

ilSessionReminder::getExpirationTime ( )
Returns
int

Definition at line 196 of file class.ilSessionReminder.php.

References $expiration_time.

Referenced by calculateSecondsUntilExpiration().

+ Here is the caller graph for this function:

◆ getLeadTime()

ilSessionReminder::getLeadTime ( )
Returns
int

Definition at line 214 of file class.ilSessionReminder.php.

References $lead_time.

Referenced by calculateSecondsUntilReminder(), and isEnoughtTimeLeftForReminder().

+ Here is the caller graph for this function:

◆ getSecondsUntilExpiration()

ilSessionReminder::getSecondsUntilExpiration ( )
Returns
int

Definition at line 232 of file class.ilSessionReminder.php.

References $seconds_until_expiration.

Referenced by calculateSecondsUntilReminder(), and isEnoughtTimeLeftForReminder().

+ Here is the caller graph for this function:

◆ getSecondsUntilReminder()

ilSessionReminder::getSecondsUntilReminder ( )
Returns
int

Definition at line 250 of file class.ilSessionReminder.php.

References $seconds_until_reminder.

◆ getUser()

ilSessionReminder::getUser ( )
Returns
ilObjUser

Definition at line 160 of file class.ilSessionReminder.php.

161 {
162 return $this->user;
163 }

References $user.

Referenced by isActive().

+ Here is the caller graph for this function:

◆ isActive()

ilSessionReminder::isActive ( )
Returns
bool

Definition at line 122 of file class.ilSessionReminder.php.

123 {
124 return
125 self::isGloballyActivated() &&
126 $this->getUser()->getId() != ANONYMOUS_USER_ID &&
127 (int)$this->getUser()->getPref('session_reminder_enabled') &&
129 }

References getUser(), and isEnoughtTimeLeftForReminder().

+ Here is the call graph for this function:

◆ isEnoughtTimeLeftForReminder()

ilSessionReminder::isEnoughtTimeLeftForReminder ( )
protected
Returns
bool

Definition at line 114 of file class.ilSessionReminder.php.

115 {
116 return $this->getLeadTime() < $this->getSecondsUntilExpiration();
117 }

References getLeadTime(), and getSecondsUntilExpiration().

Referenced by isActive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCurrentTime()

ilSessionReminder::setCurrentTime (   $current_time)
Parameters
int$current_time
Returns
ilSessionReminder

Definition at line 169 of file class.ilSessionReminder.php.

170 {
171 $this->current_time = $current_time;
172 return $this;
173 }

References $current_time.

◆ setExpirationTime()

ilSessionReminder::setExpirationTime (   $expiration_time)
Parameters
int$expiration_time
Returns
ilSessionReminder

Definition at line 187 of file class.ilSessionReminder.php.

188 {
189 $this->expiration_time = $expiration_time;
190 return $this;
191 }

References $expiration_time.

◆ setLeadTime()

ilSessionReminder::setLeadTime (   $lead_time)
Parameters
int$lead_time
Returns
ilSessionReminder

Definition at line 205 of file class.ilSessionReminder.php.

206 {
207 $this->lead_time = $lead_time;
208 return $this;
209 }

References $lead_time.

◆ setSecondsUntilExpiration()

ilSessionReminder::setSecondsUntilExpiration (   $seconds_until_expiration)
Parameters
int$seconds_until_expiration
Returns
ilSessionReminder

Definition at line 223 of file class.ilSessionReminder.php.

224 {
225 $this->seconds_until_expiration = $seconds_until_expiration;
226 return $this;
227 }

References $seconds_until_expiration.

Referenced by calculateSecondsUntilExpiration().

+ Here is the caller graph for this function:

◆ setSecondsUntilReminder()

ilSessionReminder::setSecondsUntilReminder (   $seconds_until_reminder)
Parameters
int$seconds_until_reminder
Returns
ilSessionReminder

Definition at line 241 of file class.ilSessionReminder.php.

242 {
243 $this->seconds_until_reminder = $seconds_until_reminder;
244 return $this;
245 }

References $seconds_until_reminder.

Referenced by calculateSecondsUntilReminder().

+ Here is the caller graph for this function:

◆ setUser()

ilSessionReminder::setUser (   $user)
Parameters
ilObjUser$user
Returns
ilSessionReminder

Definition at line 151 of file class.ilSessionReminder.php.

152 {
153 $this->user = $user;
154 return $this;
155 }

References $user.

Field Documentation

◆ $current_time

ilSessionReminder::$current_time = 0
protected

Definition at line 40 of file class.ilSessionReminder.php.

Referenced by getCurrentTime(), and setCurrentTime().

◆ $expiration_time

ilSessionReminder::$expiration_time = 0
protected

Definition at line 35 of file class.ilSessionReminder.php.

Referenced by getExpirationTime(), and setExpirationTime().

◆ $lead_time

ilSessionReminder::$lead_time = 0
protected

Definition at line 30 of file class.ilSessionReminder.php.

Referenced by getLeadTime(), and setLeadTime().

◆ $seconds_until_expiration

ilSessionReminder::$seconds_until_expiration = 0
protected

◆ $seconds_until_reminder

ilSessionReminder::$seconds_until_reminder = 0
protected

Definition at line 50 of file class.ilSessionReminder.php.

Referenced by getSecondsUntilReminder(), and setSecondsUntilReminder().

◆ $user

ilSessionReminder::$user
protected

Definition at line 25 of file class.ilSessionReminder.php.

Referenced by getUser(), and setUser().

◆ MIN_LEAD_TIME

const ilSessionReminder::MIN_LEAD_TIME = 2

◆ SUGGESTED_LEAD_TIME

const ilSessionReminder::SUGGESTED_LEAD_TIME = 5

The documentation for this class was generated from the following file: