当前位置: 首页>>代码示例>>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;未经允许,请勿转载。