当前位置: 首页>>代码示例>>PHP>>正文


PHP DialogBox::info方法代码示例

本文整理汇总了PHP中DialogBox::info方法的典型用法代码示例。如果您正苦于以下问题:PHP DialogBox::info方法的具体用法?PHP DialogBox::info怎么用?PHP DialogBox::info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DialogBox的用法示例。


在下文中一共展示了DialogBox::info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

    } else {
        return false;
    }
}
if (isset($_REQUEST['cmd'])) {
    $cmd = $_REQUEST['cmd'];
} else {
    $cmd = '';
}
/*=====================================================================
  Display Section
 =====================================================================*/
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
$noQUERY_STRING = true;
if ($display == DISP_REGISTRATION_FORM) {
    $dialogBox->info('Cette opération synchronise les comptes utilistateurs Claroline avec le LDAP du LCS');
}
$out = '';
// Display title
$out .= claro_html_tool_title(array('mainTitle' => $nameTools)) . $dialogBox->render();
if ($display == DISP_REGISTRATION_SUCCEED) {
    //$out .= claro_html_list($newUserMenu);
} else {
    //  if registration failed display error message
    $out .= '<style>
  .message {background-color: #E6E6E6;
    color: #339933;font-size: 0.9 em;}
  </style>';
    $out .= 'La synchronisation : <br />
    <ul>
    <li> ajoute les &#233;l&#232;ves pr&#233;sents dans le ldap mais absents de la plateforme et les affecte &#224; leur classe : <span id="cr0" class="message"></span></li>
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:init_users_lcs.php

示例2: array

                $dialogBox->error(get_lang('This introduction\'s visibility can\'t be modified'));
            }
        }
    }
}
// Display
$cmdList = array();
if (claro_is_allowed_to_edit()) {
    $cmdList[] = array('img' => 'headline_new', 'name' => get_lang('New headline'), 'url' => claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=rqAdd')));
}
$cmdList[] = array('img' => 'coursehome', 'name' => get_lang('Back to course homepage'), 'url' => claro_htmlspecialchars(Url::Contextualize(get_path('rootWeb') . 'claroline/course/index.php?cid=' . claro_get_current_course_id())));
$toolIntroIterator = new ToolIntroductionIterator(claro_get_current_course_id());
$toolIntroductionList = '';
if (count($toolIntroIterator) > 0) {
    foreach ($toolIntroIterator as $toolIntro) {
        $toolIntroductionList .= $toolIntro->render();
    }
} else {
    // If there's no item, display the form to add one
    $toolIntro = new ToolIntro();
    $dialogBox->info(get_lang('There\'s no headline for this course right now.  Use the form below to add a new one.'));
    $toolIntroForm = empty($toolIntroForm) ? $toolIntro->renderForm() : $toolIntroForm;
}
Claroline::getDisplay()->body->appendContent(claro_html_tool_title(get_lang('Headlines'), null, $cmdList));
Claroline::getDisplay()->body->appendContent($dialogBox->render());
$output = '';
$output .= $toolIntroForm . $toolIntroductionList;
// Append output
Claroline::getDisplay()->body->appendContent($output);
// Render output
echo $claroline->display->render();
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:index.php

示例3: DialogBox

    $dialogBox = new DialogBox();
    $dialogBoxMsg = get_lang('All messages older than %date% have been deleted', array('%date%' => $date)) . '<br /><br />' . '<a href="admin.php">' . get_lang('Back') . '</a>';
    $dialogBox->success($dialogBoxMsg);
    $content .= '<br />' . $dialogBox->render();
}
// --------------- end older than
// ------------ platform message
if ($displayRemovePlatformMessageConfirmation) {
    $dialogBox = new DialogBox();
    $dialogBox->setBoxType('question');
    $dialogBox->question(get_lang('Are you sure to delete all platform messages?'));
    $dialogBox->warning(get_lang('There is no way to restore deleted messages.'));
    $dialogBox->info('<br /><br /><a href="' . $_SERVER['PHP_SELF'] . '?cmd=exPlatformMessage">' . get_lang('Yes') . '</a> | <a href="admin.php">' . get_lang('No') . '</a>');
    $content .= '<br />' . $dialogBox->render();
}
if ($displayRemovePlatformMessageValidated) {
    $dialogBoxMsg = get_lang('All platform messages have been deleted') . '<br /><br />' . '<a href="admin.php">' . get_lang('Back') . '</a>';
    $dialogBox = new DialogBox();
    $dialogBox->info($dialogBoxMsg);
    $content .= '<br />' . $dialogBox->render();
}
// ------------- end platform message
// ------------------- render ----------------------------
$claroline->display->banner->breadcrumbs->append(get_lang('Administration'), get_path('rootAdminWeb'));
$claroline->display->banner->breadcrumbs->append(get_lang('Internal messaging'), 'admin.php');
$claroline->display->banner->breadcrumbs->append(get_lang('Delete'), 'admin_delete.php?cmd=' . addslashes($_REQUEST['cmd']));
$title['mainTitle'] = get_lang('Internal messaging') . ' - ' . get_lang('Delete');
$title['subTitle'] = $subTitle;
$claroline->display->body->appendContent(claro_html_tool_title($title));
$claroline->display->body->appendContent($content);
echo $claroline->display->render();
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:admin_delete.php

示例4: elseif

                    $message->setCourse($_POST['courseRecipient']);
                } elseif ($_REQUEST['typeRecipient'] == 'all') {
                    $recipient = new AllUsersRecipient();
                    // breadcrump
                    $claroline->display->banner->breadcrumbs->append(get_lang('Administration'), get_path('rootAdminWeb'));
                } elseif ($_REQUEST['typeRecipient'] == 'group') {
                    $recipient = new GroupRecipient($_POST['groupRecipient'], $_POST['courseRecipient']);
                    $message->setCourse($_POST['courseRecipient']);
                    $message->setGroup($_POST['groupRecipient']);
                } else {
                    claro_die(get_lang('unknow recipient type'));
                }
                $recipient->sendMessage($message);
                $informationString = get_lang('Message sent') . '<br /><br />' . '<a href="messagebox.php?box=inbox">' . get_lang('Back to inbox') . '</a>';
                $dialogbox = new DialogBox();
                $dialogbox->info($informationString);
                if ($failure = claro_failure::get_last_failure()) {
                    $dialogbox->warning($failure);
                }
                $content .= $dialogbox->render();
            }
        }
    }
}
// ------------ Prepare display --------------------
if ($addForm) {
    $message = claro_html_sanitize_all($message);
    $content .= "<br/>";
    $content .= '<form method="post" action="sendmessage.php?cmd=exSendMessage' . claro_url_relay_context('&amp;') . '">' . "\n" . '<input type="hidden" name="claroFormId" value="' . uniqid('') . '" />' . "\n" . claro_form_relay_context() . "\n" . '<input type="hidden" name="cmd" value="exSendMessage" />' . "\n" . '<input type="hidden" name="typeRecipient" value="' . $typeRecipient . '" />' . "\n" . '<input type="hidden" name="userRecipient" value="' . $userRecipient . '" />' . "\n" . '<input type="hidden" name="courseRecipient" value="' . $courseRecipient . '" />' . "\n" . '<input type="hidden" name="groupRecipient" value="' . $groupRecipient . '" />' . "\n" . '<input type="hidden" name="responseTo" value="' . $responseTo . '" />' . "\n" . '<label for="message_subject">' . get_lang('Subject') . ' : </label><br/><input type="text" id="message_subject" name="subject" value="' . claro_htmlspecialchars($subject) . '" maxlength="255" size="40" /><br/>' . "\n" . '<label for="message">' . get_lang('Message') . ' : </label><br/>' . claro_html_textarea_editor('message', $message) . '<br/><br/>' . "\n" . '<input type="submit" value="' . get_lang('Send') . '" name="send" />' . "\n" . '</form>' . "\n\n";
}
$claroline->display->body->appendContent(claro_html_tool_title(get_lang('Compose a message')));
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:sendmessage.php

示例5: foreach

                // TODO  display in a popup "To Print" with  content to give to user.
            }
        }
    } else {
        // User validate form return error messages
        if (is_array($messageList) && !empty($messageList)) {
            foreach ($messageList as $message) {
                $dialogBox->error($message);
            }
        }
        $error = true;
    }
}
/*=====================================================================
  Display Section
 =====================================================================*/
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
$noQUERY_STRING = true;
if ($display == DISP_REGISTRATION_FORM) {
    $dialogBox->info(get_lang('New users will receive an e-mail with their username and password'));
}
$out = '';
// Display title
$out .= claro_html_tool_title(array('mainTitle' => $nameTools)) . $dialogBox->render();
if ($display == DISP_REGISTRATION_SUCCEED) {
    $out .= claro_html_list($newUserMenu);
} else {
    $out .= user_html_form();
}
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:adminaddnewuser.php

示例6: CsvExporter

            }
            $csvExporter = new CsvExporter(';', '"');
            $fileName = get_lang('files_stats') . '_' . claro_date('d-m-Y') . '.csv';
            $stream = $csvExporter->export($csvTab);
            claro_send_stream($stream, $fileName, 'text/csv');
        }
    } else {
        $dialogBox->warning(get_lang('Statistics in progress, please don\'t refresh until further instructions ! ') . '<br />' . get_lang('Course actually treated : ') . $course['title'] . '<br />' . get_lang(' Number of course treated : ') . count($stats));
        $claroline->display->body->appendContent($dialogBox->render());
        echo $claroline->display->render();
    }
} else {
    $dialogBox = new DialogBox();
    $dialogBox->warning(get_lang('Caution: building files\' statistics is a pretty heavy work.  It might take a while and a lot of resources, depending of the size of your campus.'));
    if (!empty($extensions)) {
        $dialogBox->info(get_lang('You\'ve chosen to isolate the following extensions: %types.  If you wish to modify these extensions, check the advanced platform settings', array('%types' => implode(', ', $extensions))));
    } else {
        $dialogBox->info(get_lang('You don\'t have chosen any extension to isolate.  If you wish to isolate extensions in your statistics, check the advanced platform settings'));
    }
    $template = new CoreTemplate('admin_files_stats.tpl.php');
    $template->assign('dialogBox', $dialogBox);
    $template->assign('extensions', $extensions);
    $template->assign('formAction', $_SERVER['PHP_SELF']);
    $template->assign('cancelUrl', get_path('rootAdminWeb'));
    $claroline->display->body->appendContent($template->render());
    echo $claroline->display->render();
}
/**
 * Convert a size (Bytes) to KiB/MiB/GiB/TiB
 * @param int $size
 * @return string
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:files_stats.php

示例7: elseif

if (claro_is_allowed_to_edit() && $topicId) {
    $out .= '<div style="float: right;">' . "\n" . '<img src=' . get_icon_url('html') . '" alt="" /> <a href="' . claro_htmlspecialchars(Url::Contextualize('export.php?type=HTML&topic=' . $topicId)) . '" target="_blank">' . get_lang('Export to HTML') . '</a>' . "\n" . '<img src="' . get_icon_url('mime/pdf') . '" alt="" /> <a href="' . claro_htmlspecialchars(Url::Contextualize('export.php?type=PDF&topic=' . $topicId)) . '" target="_blank">' . get_lang('Export to PDF') . '</a>' . "\n" . '</div>';
}
if ($topicSettingList) {
    $out .= disp_forum_breadcrumb($pagetype, $forumSettingList['forum_id'], $forumSettingList['forum_name'], $topicSettingList['topic_id'], $topicSettingList['topic_title']);
} else {
    $out .= disp_forum_breadcrumb($pagetype, $forumSettingList['forum_id'], $forumSettingList['forum_name']);
}
if ('show' != $cmd) {
    if ('default' == $anonymityStatus) {
        $info = '<tr valign="top">' . "\n" . '<td>&nbsp;</td>' . '<td><strong>' . get_lang('Contributions to this forum are anonymous by default!<br/>') . get_lang('If you want to sign your post all the same, uncheck the checkbox above the "OK" button') . '</strong></td>' . '</tr>' . '<tr style="height:1px;"><td colspan="2">&nbsp;</td></tr>';
    } elseif ('allowed' == $anonymityStatus) {
        $info = '<tr valign="top">' . "\n" . '<td>&nbsp;</td>' . '<td><strong>' . get_lang('This forum allows anonymous contributions!<br/>') . get_lang('If you do not want to sign your post, check the checkbox above the "OK" button') . '</strong></td>' . '</tr>' . '<tr style="height:1px;"><td colspan="2">&nbsp;</td></tr>';
    }
    if (!empty($info)) {
        $dialogBox->info($info);
    }
}
$out .= $dialogBox->render();
//display edit form if any
if (isset($form)) {
    $formBox = new DialogBox();
    $formBox->form($form->render());
    $out .= $formBox->render() . '<hr />';
}
//display topic review if any
if ($topicSettingList) {
    // get post and use pager
    if (!$viewall) {
        $postLister = new postLister($topicId, $start, get_conf('posts_per_page'));
    } else {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:viewtopic.php

示例8: MessageToSend

        if (empty($subject)) {
            $subject .= get_lang('Message from your lecturer');
        }
        // content
        $body = $_REQUEST['content'];
        $message = new MessageToSend(claro_get_current_user_id(), $subject, $body);
        $message->setCourse(claro_get_current_course_id());
        $recipient = new UserListRecipient();
        $recipient->addUserIdList($userIdList);
        $recipient->sendMessage($message);
        $dialogBox = new DialogBox();
        $dialogBox->success(get_lang('Message sent'));
        if ($failure = claro_failure::get_last_failure()) {
            $dialogBox->warning($failure);
        }
        $dialogBox->info('<a href="' . $_SERVER['PHP_SELF'] . '">&lt;&lt;&nbsp;' . get_lang('Back') . '</a>');
        $content .= $dialogBox->render();
    }
    // end cmd exSendMessage
} else {
    /*
     * Get user    list of    this course
     */
    $singleUserList = claro_get_course_user_list(claro_get_current_course_id());
    $userList = array();
    if (is_array($singleUserList) && !empty($singleUserList)) {
        foreach ($singleUserList as $singleUser) {
            $userList[] = $singleUser;
        }
    }
    /*
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:messagescourse.php

示例9: switch

            user_set_course_properties($userId, $courseCode, $properties);
        }
    } else {
        switch ($courseRegistration->getStatus()) {
            case Claro_CourseUserRegistration::STATUS_KEYVALIDATION_FAILED:
                $displayMode = DISPLAY_REGISTRATION_KEY_FORM;
                $dialogBox->error($courseRegistration->getErrorMessage());
                break;
            case Claro_CourseUserRegistration::STATUS_SYSTEM_ERROR:
                $displayMode = DISPLAY_MESSAGE_SCREEN;
                $dialogBox->error($courseRegistration->getErrorMessage());
                break;
            case Claro_CourseUserRegistration::STATUS_REGISTRATION_NOTAVAILABLE:
                $displayMode = DISPLAY_REGISTRATION_DISABLED_FORM;
                $dialogBox->error($courseRegistration->getErrorMessage());
                $dialogBox->info(get_lang('Please contact the course manager : %email', array('%email' => '<a href="mailto:' . $courseObj->email . '?body=' . $courseObj->officialCode . '&amp;subject=[' . rawurlencode(get_conf('siteName')) . ']' . '">' . claro_htmlspecialchars($courseObj->titular) . '</a>')));
                break;
            default:
                $displayMode = DISPLAY_MESSAGE_SCREEN;
                $dialogBox->warning($courseRegistration->getErrorMessage());
                break;
        }
    }
}
// end if ($cmd == 'exReg')
/*----------------------------------------------------------------------------
User course list to unregister
----------------------------------------------------------------------------*/
if ($cmd == 'rqUnreg') {
    $courseListView = CourseTreeNodeViewFactory::getUserCourseTreeView($userId);
    $unenrollUrl = Url::buildUrl($_SERVER['PHP_SELF'] . '?cmd=exUnreg', $urlParamList, null);
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:courses.php

示例10: count

 }
 // Unregister user from course
 // (notice : it does not delete user from claroline main DB)
 if ('allStudent' == $req['user_id']) {
     // TODO : add a function to unenroll all users from a course
     $course = new Claro_Course(claro_get_current_course_id());
     $course->load();
     $claroCourseRegistration = new Claro_BatchCourseRegistration($course);
     $claroCourseRegistration->removeAllUsers($req['keepClasses']);
     $result = $claroCourseRegistration->getResult();
     if (!$result->hasError() || !$result->checkStatus(Claro_BatchRegistrationResult::STATUS_ERROR_DELETE_FAIL)) {
         $unregisterdUserCount = count($result->getDeletedUserList());
         if ($unregisterdUserCount) {
             Console::log("{$req['user_id']} ({$unregisterdUserCount}) removed by user " . claro_get_current_user_id(), 'COURSE_UNSUBSCRIBE');
         }
         $dialogBox->info(get_lang('%number student(s) unregistered from this course', array('%number' => $unregisterdUserCount)));
     } else {
         Console::error("Error while deleting all users from course " . claro_get_current_course_id() . " : " . var_export($result->getErrorLog(), true));
         $dialogBox->error(get_lang('An error occured') . ' : <ul><li>' . implode('</li><li>', $result->getErrorLog()) . '</li></ul>');
     }
 } elseif (0 < (int) $req['user_id']) {
     if ($forceUnenrolment) {
         $course = new Claro_Course(claro_get_current_course_id());
         $course->load();
         $userCourseRegistration = new Claro_CourseUserRegistration(AuthProfileManager::getUserAuthProfile($req['user_id']), $course);
         if (claro_is_platform_admin()) {
             $userCourseRegistration->forceUnregistrationOfManager();
         }
         if (!$userCourseRegistration->forceRemoveUser(false, array())) {
             $dialogBox->error(get_lang('The user cannot be removed from the course'));
         } else {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:user.php

示例11: DialogBox

 //  Display results
 /*if( $exercise->getShuffle() && $exercise->getUseSameShuffle() && isset( $_SESSION['lastRandomQuestionList'] ) )
   {
       $out .= '<div style="font-weight: bold;">' . "\n"
       .   '<a href="exercise.php?exId=' . $exercise->getId() .'&cmd=exSaveQwz'.( $inLP ? '&calledFrom=CLLP&embedded=true' : '' ).'">' . get_lang('Save this questions list') . '</a>'
       .   '</div>'
       ;
   }*/
 if ($recordResults) {
     $dialogBoxResults = new DialogBox();
     $outDialogbox = '';
     if ($exercise->getTimeLimit() > 0) {
         $outDialogbox .= get_lang('Your time is %time', array('%time' => claro_html_duration($timeToCompleteExe))) . '<br />' . "\n";
     }
     $outDialogbox .= '<strong>' . get_lang('Your total score is %score', array('%score' => $totalResult . "/" . $totalGrade)) . '</strong>';
     $dialogBoxResults->info($outDialogbox);
     $out .= $dialogBoxResults->render();
 } else {
     $contentDialogBox = '';
     if ($exercise->getTimeLimit() > 0) {
         $contentDialogBox .= get_lang('Your time is %time', array('%time' => claro_html_duration($timeToCompleteExe))) . '<br />' . "\n";
     }
     $contentDialogBox .= get_lang('Time is over, results not submitted.');
     $dialogBox->error($contentDialogBox);
     $dialogBox->info('<a href="' . claro_htmlspecialchars(Url::Contextualize('./exercise.php')) . '">&lt;&lt; ' . get_lang('Back') . '</a>');
 }
 //-- question(s)
 if (!empty($questionList)) {
     $out .= "\n" . '<table width="100%" border="0" cellpadding="1" cellspacing="0" class="claroTable">' . "\n\n";
     // foreach question
     $questionIterator = 1;
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:exercise_submit.php

示例12:

    } else {
        return false;
    }
}
if (isset($_REQUEST['cmd'])) {
    $cmd = $_REQUEST['cmd'];
} else {
    $cmd = '';
}
/*=====================================================================
  Display Section
 =====================================================================*/
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
$noQUERY_STRING = true;
if ($display == DISP_REGISTRATION_FORM) {
    $dialogBox->info('Cette initialisation ne doit &ecirc;tre faite qu\'en d&eacute;but d\'ann&eacute;e');
}
$out = '';
// Display title
$out .= claro_html_tool_title(array('mainTitle' => $nameTools)) . $dialogBox->render();
if ($display == DISP_REGISTRATION_SUCCEED) {
    //$out .= claro_html_list($newUserMenu);
} else {
    //  if registration failed display error message
    $out .= '<style>
  .message {background-color: #E6E6E6;
    color: #339933;font-size: 0.9 em;}
  </style>';
    $out .= 'L\'initialisation : <br />
    <ul>
    <li> supprime les classes existantes : <span id="cr0" class="message"></span></li>
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:init_lcs.php

示例13: trim

             $doChange = false;
         }
     }
 } else {
     $dialogBox->error(get_lang('There is no category available !'));
     $doChange = false;
 }
 // Edit a category (don't move the category)
 $_REQUEST['nameCat'] = trim($_REQUEST['nameCat']);
 $_REQUEST['codeCat'] = trim($_REQUEST['codeCat']);
 if (!empty($_REQUEST['nameCat']) && !empty($_REQUEST['codeCat'])) {
     if (!isset($_REQUEST['fatherCat']) && $doChange) {
         $canHaveCoursesChild = $_REQUEST['canHaveCoursesChild'] == 1 ? 'TRUE' : 'FALSE';
         // If nothing is different
         if ($facultyEdit['name'] != $_REQUEST['nameCat'] && $facultyEdit['code'] != $_REQUEST['codeCat'] && $facultyEdit['canHaveCoursesChild'] != $canHaveCoursesChild) {
             $dialogBox->info(get_lang('No change applied.'));
         } else {
             // If the category can't have course child, look if they haven't already
             if ($canHaveCoursesChild == 'FALSE') {
                 $sql_SearchCourses = " SELECT count(cours_id) num" . " FROM `" . $tbl_course . "`" . " WHERE faculte = '" . claro_sql_escape($facultyEdit['code']) . "'";
                 $array = claro_sql_query_fetch_all($sql_SearchCourses);
                 if ($array[0]['num'] > 0) {
                     $dialogBox->error(get_lang('This category include some courses, you must delete or move them before'));
                     $canHaveCoursesChild = "TRUE";
                 } else {
                     $sql_ChangeInfoFaculty = " UPDATE `" . $tbl_course_node . "`\n                                                      SET name='" . claro_sql_escape($_REQUEST['nameCat']) . "',\n                                                          code='" . claro_sql_escape($_REQUEST['codeCat']) . "',\n                                                          canHaveCoursesChild='" . $canHaveCoursesChild . "'\n                                                      WHERE id='" . (int) $_REQUEST['id'] . "'";
                     claro_sql_query($sql_ChangeInfoFaculty);
                     $dialogBox->success(get_lang('Changes have been saved'));
                 }
             } else {
                 $sql_ChangeInfoFaculty = "SELECT id\n                                                FROM `" . $tbl_course_node . "`\n                                                WHERE code = '" . claro_sql_escape($_REQUEST["codeCat"]) . "'\n                                                AND id != '" . (int) $_REQUEST["id"] . "'";
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:admincats.php

示例14:

if ($is_allowedToEdit) {
    /*--------------------------------------------------------------------
      MODIFY An ASSIGNMENT FEEDBACK
      --------------------------------------------------------------------*/
    /*-----------------------------------
      STEP 2 : check & query
      -------------------------------------*/
    // edit an assignment / form has been sent
    if ($cmd == 'exEditFeedback') {
        $assignment->setAutoFeedbackText($autoFeedbackText);
        $assignment->setAutoFeedbackFilename($autoFeedbackFilename);
        $assignment->setAutoFeedbackSubmitMethod($autoFeedbackSubmitMethod);
        // form data have been handled before this point if the form was sent
        if ($formCorrectlySent && $assignment->save()) {
            $dialogBox->success(get_lang('Feedback edited'));
            $dialogBox->info('<a href="' . claro_htmlspecialchars(Url::Contextualize('./work_list.php?assigId=' . $assignmentId)) . '">' . get_lang('Continue') . '</a>');
            $displayFeedbackForm = false;
            //report event to eventmanager "feedback_posted"
            $eventNotifier->notifyCourseEvent("work_feedback_posted", claro_get_current_course_id(), claro_get_current_tool_id(), $assignmentId, '0', '0');
        } else {
            $cmd = 'rqEditFeedback';
        }
    }
    /*-----------------------------------
      STEP 1 : display form
      -------------------------------------*/
    // edit assignment / display the form
    if ($cmd == 'rqEditFeedback') {
        require_once get_path('incRepositorySys') . '/lib/form.lib.php';
        // check if it was already sent
        if (!$isFeedbackSubmitted) {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:feedback.php

示例15: prepare_get_filtred_course_list

 */
$sortUrlList = $myPager->get_sort_url_list($_SERVER['PHP_SELF']);
$courseDataGrid = new claro_datagrid($courseDataList);
$courseDataGrid->set_colTitleList(array('officialCode' => '<a href="' . $sortUrlList['officialCode'] . '">' . get_lang('Course code') . '</a>', 'intitule' => '<a href="' . $sortUrlList['intitule'] . '">' . get_lang('Course title') . '</a>', 'qty_cm' => get_lang('Course members'), 'cmdSetting' => get_lang('Course settings'), 'cmdDelete' => get_lang('Delete')));
$courseDataGrid->set_colAttributeList(array('qty_cm' => array('align' => 'right'), 'cmdSetting' => array('align' => 'center'), 'cmdDelete' => array('align' => 'center')));
$courseDataGrid->set_idLineType('none');
$courseDataGrid->set_colHead('officialCode');
$courseDataGrid->set_noRowMessage(get_lang('There is no course matching such criteria') . '<br />' . '<a href="advanced_course_search.php' . $addtoAdvanced . '">' . get_lang('Search again (advanced)') . '</a>');
// Command list
$cmdList = array();
$cmdList[] = array('img' => 'courseadd', 'name' => get_lang('Create course'), 'url' => '../course/create.php?adminContext=1');
// Display
$out = '';
$out .= claro_html_tool_title($nameTools, null, $cmdList);
if (!empty($isSearched)) {
    $dialogBox->info('<b>' . get_lang('Search on') . '</b> : <small>' . $isSearched . '</small>');
}
$out .= $dialogBox->render();
// DISPLAY : Search/filter panel
$out .= '<table width="100%">' . "\n\n" . '<tr>' . "\n" . '<td align="right"  valign="top">' . "\n\n" . '<form action="' . $_SERVER['PHP_SELF'] . '">' . "\n" . '<label for="search">' . get_lang('Make new search') . ' : </label>' . "\n" . '<input type="text" value="' . claro_htmlspecialchars($search) . '" name="search" id="search" />' . "\n" . '<input type="submit" value=" ' . get_lang('Ok') . ' " />' . "\n" . '<input type="hidden" name="newsearch" value="yes" />' . "\n" . '[<a class="claroCmd" href="advanced_course_search.php' . $addtoAdvanced . '">' . get_lang('Advanced') . '</a>]' . "\n" . '</form>' . "\n\n" . '</td>' . "\n" . '</tr>' . "\n\n" . '</table>' . "\n\n";
// DISPLAY : List of datas
$out .= $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF']) . $courseDataGrid->render() . $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF']);
$claroline->display->body->appendContent($out);
echo $claroline->display->render();
/**
 * Prepares the sql request to select courses in database.
 *
 * @return string $sql
 */
function prepare_get_filtred_course_list()
{
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:admin_courses.php


注:本文中的DialogBox::info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。