當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tracking::get_inactives_students_in_course方法代碼示例

本文整理匯總了PHP中Tracking::get_inactives_students_in_course方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tracking::get_inactives_students_in_course方法的具體用法?PHP Tracking::get_inactives_students_in_course怎麽用?PHP Tracking::get_inactives_students_in_course使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tracking的用法示例。


在下文中一共展示了Tracking::get_inactives_students_in_course方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_lang

    //@todo use formvalidator
    if (empty($group_id)) {
        echo '	<div class="control-group">
					<label class="control-label">' . Display::return_icon('group.png', get_lang('ModifyRecipientList'), array('align' => 'absmiddle'), ICON_SIZE_SMALL) . ' ' . get_lang('SentTo') . '
					</label>
					<div class="controls">';
        if (isset($_GET['remind_inactive'])) {
            $email_ann = '1';
            $_SESSION['select_groupusers'] = "show";
            $content_to_modify = sprintf(get_lang('RemindInactiveLearnersMailContent'), api_get_setting('siteName'), 7);
            $title_to_modify = sprintf(get_lang('RemindInactiveLearnersMailSubject'), api_get_setting('siteName'));
        } elseif (isset($_GET['remindallinactives']) && $_GET['remindallinactives'] == 'true') {
            // we want to remind inactive users. The $_GET['since'] parameter determines which users have to be warned (i.e the users who have been inactive for x days or more
            $since = isset($_GET['since']) ? intval($_GET['since']) : 6;
            // getting the users who have to be reminded
            $to = Tracking::get_inactives_students_in_course($_course['id'], $since, api_get_session_id());
            // setting the variables for the form elements: the users who need to receive the message
            foreach ($to as &$user) {
                $user = 'USER:' . $user;
            }
            // setting the variables for the form elements: the 'visible to' form element has to be expanded
            $_SESSION['select_groupusers'] = "show";
            // setting the variables for the form elements: the message has to be sent by email
            $email_ann = '1';
            // setting the variables for the form elements: the title of the email
            //$title_to_modify = sprintf(get_lang('RemindInactiveLearnersMailSubject'), api_get_setting('siteName'),' > ',$_course['name']);
            $title_to_modify = sprintf(get_lang('RemindInactiveLearnersMailSubject'), api_get_setting('siteName'));
            // setting the variables for the form elements: the message of the email
            //$content_to_modify = sprintf(get_lang('RemindInactiveLearnersMailContent'),api_get_setting('siteName'),' > ',$_course['name'],$since);
            $content_to_modify = sprintf(get_lang('RemindInactiveLearnersMailContent'), api_get_setting('siteName'), $since);
            // when we want to remind the users who have never been active then we have a different subject and content for the announcement
開發者ID:annickvdp,項目名稱:Chamilo1.9.10,代碼行數:31,代碼來源:announcements.php

示例2: get_lang

     $form_name = get_lang('AddAnnouncement');
 } else {
     $form_name = get_lang('ModifyAnnouncement');
 }
 $form->addElement('header', $form_name);
 if (empty($group_id)) {
     if (isset($_GET['remind_inactive'])) {
         $email_ann = '1';
         $_SESSION['select_groupusers'] = "show";
         $content_to_modify = sprintf(get_lang('RemindInactiveLearnersMailContent'), api_get_setting('siteName'), 7);
         $title_to_modify = sprintf(get_lang('RemindInactiveLearnersMailSubject'), api_get_setting('siteName'));
     } elseif (isset($_GET['remindallinactives']) && $_GET['remindallinactives'] == 'true') {
         // we want to remind inactive users. The $_GET['since'] parameter determines which users have to be warned (i.e the users who have been inactive for x days or more
         $since = isset($_GET['since']) ? intval($_GET['since']) : 6;
         // getting the users who have to be reminded
         $to = Tracking::get_inactives_students_in_course(api_get_course_int_id(), $since, api_get_session_id());
         // setting the variables for the form elements: the users who need to receive the message
         foreach ($to as &$user) {
             $user = 'USER:' . $user;
         }
         // setting the variables for the form elements: the message has to be sent by email
         $email_ann = '1';
         // setting the variables for the form elements: the title of the email
         $title_to_modify = sprintf(get_lang('RemindInactiveLearnersMailSubject'), api_get_setting('siteName'));
         // setting the variables for the form elements: the message of the email
         $content_to_modify = sprintf(get_lang('RemindInactiveLearnersMailContent'), api_get_setting('siteName'), $since);
         // when we want to remind the users who have never been active then we have a different subject and content for the announcement
         if ($_GET['since'] == 'never') {
             $title_to_modify = sprintf(get_lang('RemindInactiveLearnersMailSubject'), api_get_setting('siteName'));
             $content_to_modify = get_lang('YourAccountIsActiveYouCanLoginAndCheckYourCourses');
         }
開發者ID:ilosada,項目名稱:chamilo-lms-icpna,代碼行數:31,代碼來源:announcements.php


注:本文中的Tracking::get_inactives_students_in_course方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。