ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSurveyCronNotification Class Reference

Cron for survey notifications. More...

+ Inheritance diagram for ilSurveyCronNotification:
+ Collaboration diagram for ilSurveyCronNotification:

Public Member Functions

 getId ()
 Get id.
 getTitle ()
 Get title.
 getDescription ()
 Get description.
 getDefaultScheduleType ()
 Get schedule type.
 getDefaultScheduleValue ()
 Get schedule value.
 hasAutoActivation ()
 Is to be activated on "installation".
 hasFlexibleSchedule ()
 Can the schedule be configured?
 run ()
 Run job.
- Public Member Functions inherited from ilCronJob
 isActive ($a_ts_last_run, $a_schedule_type, $a_schedule_value, $a_manual=false)
 Is job currently active?
 getScheduleType ()
 Get current schedule type (if flexible)
 getScheduleValue ()
 Get current schedule value (if flexible)
 setSchedule ($a_type, $a_value)
 Update current schedule (if flexible)
 getValidScheduleTypes ()
 Get all available schedule types.
 isManuallyExecutable ()
 Defines whether or not a cron job can be started manually.
 hasCustomSettings ()
 Has cron job any custom setting which can be edited?
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 Add custom settings to form.
 saveCustomSettings (ilPropertyFormGUI $a_form)
 Save custom settings.
 addToExternalSettingsForm ($a_form_id, array &$a_fields, $a_is_active)
 Add external settings to form.
 activationWasToggled ($a_currently_active)
 Cron job status was changed.

Additional Inherited Members

- Data Fields inherited from ilCronJob
const SCHEDULE_TYPE_DAILY = 1
const SCHEDULE_TYPE_IN_MINUTES = 2
const SCHEDULE_TYPE_IN_HOURS = 3
const SCHEDULE_TYPE_IN_DAYS = 4
const SCHEDULE_TYPE_WEEKLY = 5
const SCHEDULE_TYPE_MONTHLY = 6
const SCHEDULE_TYPE_QUARTERLY = 7
const SCHEDULE_TYPE_YEARLY = 8
- Protected Member Functions inherited from ilCronJob
 checkSchedule ($a_ts_last_run, $a_schedule_type, $a_schedule_value)

Detailed Description

Cron for survey notifications.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 13 of file class.ilSurveyCronNotification.php.

Member Function Documentation

ilSurveyCronNotification::getDefaultScheduleType ( )

Get schedule type.

Returns
int

Reimplemented from ilCronJob.

Definition at line 36 of file class.ilSurveyCronNotification.php.

References ilCronJob\SCHEDULE_TYPE_DAILY.

ilSurveyCronNotification::getDefaultScheduleValue ( )

Get schedule value.

Returns
int|array

Reimplemented from ilCronJob.

Definition at line 41 of file class.ilSurveyCronNotification.php.

{
return;
}
ilSurveyCronNotification::getDescription ( )

Get description.

Returns
string

Reimplemented from ilCronJob.

Definition at line 28 of file class.ilSurveyCronNotification.php.

References $lng.

{
global $lng;
$lng->loadLanguageModule("survey");
return $lng->txt("survey_reminder_cron_info");
}
ilSurveyCronNotification::getId ( )

Get id.

Returns
string

Reimplemented from ilCronJob.

Definition at line 15 of file class.ilSurveyCronNotification.php.

{
return "survey_notification";
}
ilSurveyCronNotification::getTitle ( )

Get title.

Returns
string

Reimplemented from ilCronJob.

Definition at line 20 of file class.ilSurveyCronNotification.php.

References $lng.

{
global $lng;
$lng->loadLanguageModule("survey");
return $lng->txt("survey_reminder_setting");
}
ilSurveyCronNotification::hasAutoActivation ( )

Is to be activated on "installation".

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 46 of file class.ilSurveyCronNotification.php.

{
return true;
}
ilSurveyCronNotification::hasFlexibleSchedule ( )

Can the schedule be configured?

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 51 of file class.ilSurveyCronNotification.php.

{
return false;
}
ilSurveyCronNotification::run ( )

Run job.

Returns
ilCronJobResult

Reimplemented from ilCronJob.

Definition at line 56 of file class.ilSurveyCronNotification.php.

References $result, ilCronJobResult\STATUS_NO_ACTION, and ilCronJobResult\STATUS_OK.

{
global $tree;
include_once "Modules/Survey/classes/class.ilObjSurvey.php";
$message = array();
$root = $tree->getNodeData(ROOT_FOLDER_ID);
foreach($tree->getSubTree($root, false, "svy") as $svy_ref_id)
{
$svy = new ilObjSurvey($svy_ref_id);
if($svy->checkReminder())
{
$message[] = $svy_ref_id;
}
}
$result->setStatus($status);
if(sizeof($message))
{
$result->setMessage("Ref-Ids: ".implode(", ", $message));
$result->setCode("#".sizeof($message));
}
return $result;
}

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