40 $this->
lng = $DIC->language();
41 if (isset(
$DIC[
"tree"])) {
42 $this->tree =
$DIC->repositoryTree();
48 return "survey_notification";
56 return $lng->
txt(
"survey_reminder_cron");
64 return $lng->
txt(
"survey_reminder_cron_info");
69 return JobScheduleType::DAILY;
94 $status = JobResult::STATUS_NO_ACTION;
100 $num = $svy->checkReminder();
101 if (!is_null($num)) {
102 $message[] = $svy_ref_id .
"(" . $num .
")";
103 $status = JobResult::STATUS_OK;
108 $result->setStatus($status);
111 $full_msg =
"Ref-Ids: " . implode(
", ",
$message) .
' / ' .
"#" . count(
$message);
113 if (mb_strlen($full_msg) > self::MAX_MESSAGE_LENGTH) {
114 $short_msg = mb_substr($full_msg, 0, self::MAX_MESSAGE_LENGTH) .
'...';
115 $log->info(
"Notification message was truncated to fit DB limit. Full message: \"$full_msg\"");
117 $short_msg = $full_msg;
120 $result->setMessage($short_msg);
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getLogger(string $a_component_id)
Get component logger.
Cron for survey notifications (reminder to paricipate in the survey)
hasAutoActivation()
Is to be activated on "installation", does only work for ILIAS core cron jobs.
getDefaultScheduleValue()
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node