本文整理汇总了PHP中Display::display_warning_message方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::display_warning_message方法的具体用法?PHP Display::display_warning_message怎么用?PHP Display::display_warning_message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::display_warning_message方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Image constructor.
* @param string $path
*/
public function __construct($path)
{
if (IMAGE_PROCESSOR == 'gd') {
$this->image_wrapper = new GDWrapper($path);
} else {
if (class_exists('Imagick')) {
$this->image_wrapper = new ImagickWrapper($path);
} else {
Display::display_warning_message('Class Imagick not found');
exit;
}
}
}
示例2: __construct
function __construct($path)
{
$path = preg_match(VALID_WEB_PATH, $path) ? api_is_internal_path($path) ? api_get_path(TO_SYS, $path) : $path : $path;
if (IMAGE_PROCESSOR == 'gd') {
$this->image_wrapper = new GDWrapper($path);
} else {
if (class_exists('Imagick')) {
$this->image_wrapper = new ImagickWrapper($path);
} else {
Display::display_warning_message('Class Imagick not found');
exit;
}
}
}
示例3: isset
exit;
}
$action = isset($_GET['action']) ? $_GET['action'] : null;
switch ($action) {
case 'empty':
if (api_is_allowed_to_edit(false, true)) {
GroupManager::unsubscribe_all_users($group_id);
Display::display_confirmation_message(get_lang('GroupEmptied'));
}
break;
}
$defaults = $current_group;
$defaults['group_members'] = $selected_users;
$action = isset($_GET['action']) ? $_GET['action'] : '';
$defaults['action'] = $action;
if (!empty($_GET['keyword']) && !empty($_GET['submit'])) {
$keyword_name = Security::remove_XSS($_GET['keyword']);
echo '<br/>' . get_lang('SearchResultsFor') . ' <span style="font-style: italic ;"> ' . $keyword_name . ' </span><br>';
}
Display::display_header($nameTools, 'Group');
//@todo fix this
if (isset($_GET['show_message_warning'])) {
echo Display::display_warning_message($_GET['show_message_warning']);
}
if (isset($_GET['show_message_sucess'])) {
echo Display::display_normal_message($_GET['show_message_sucess']);
}
$form->setDefaults($defaults);
echo GroupManager::getSettingBar('member');
$form->display();
Display::display_footer();
示例4: api_protect_course_script
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_COURSE_MAINTENANCE;
api_protect_course_script(true);
$_course = api_get_course_info();
$current_course_code = $_course['official_code'];
$current_course_name = $_course['name'];
if (!api_is_allowed_to_edit()) {
api_not_allowed(true);
}
$tool_name = get_lang('DelCourse');
if (isset($_GET['delete']) && $_GET['delete'] == 'yes') {
CourseManager::delete_course($_course['sysCode']);
$obj_cat = new Category();
$obj_cat->update_category_delete($_course['sysCode']);
// DELETE CONFIRMATION MESSAGE
Session::erase('_cid');
Session::erase('_real_cid');
$noPHP_SELF = true;
$message = '<h2>' . get_lang('Course') . ' : ' . $current_course_name . ' (' . $current_course_code . ') </h2>';
$message .= get_lang('HasDel');
$message .= '<br /><br /><a href="../../index.php">' . get_lang('BackHome') . ' ' . api_get_setting('platform.site_name') . '</a>';
} else {
$message = '<h3>' . get_lang('Course') . ' : ' . $current_course_name . ' (' . $current_course_code . ') </h3>';
$message .= '<p>' . get_lang('ByDel') . '</p>';
$message .= '<p><a class="btn btn-primary" href="' . api_get_path(WEB_CODE_PATH) . 'course_info/maintenance.php?' . api_get_cidreq() . '">' . get_lang('No') . '</a> <a class="btn" href="' . api_get_self() . '?delete=yes&' . api_get_cidreq() . '">' . get_lang('Yes') . '</a></p>';
$interbreadcrumb[] = array('url' => 'maintenance.php', 'name' => get_lang('Maintenance'));
}
Display::display_header($tool_name, 'Settings');
echo Display::page_header($tool_name);
Display::display_warning_message($message, false);
Display::display_footer();
示例5: api_get_self
$certificate_list = GradebookUtils::get_list_users_certificates($cat_id);
}
echo '<div class="btn-group">';
$url = api_get_self() . '?action=generate_all_certificates' . '&' . api_get_cidReq() . '&cat_id=' . $cat_id . '&filter=' . $filterOfficialCode;
echo Display::url(get_lang('GenerateCertificates'), $url, array('class' => 'btn btn-default'));
$url = api_get_self() . '?action=delete_all_certificates' . '&' . api_get_cidReq() . '&cat_id=' . $cat_id . '&filter=' . $filterOfficialCode;
echo Display::url(get_lang('DeleteAllCertificates'), $url, array('class' => 'btn btn-default'));
$hideCertificateExport = api_get_setting('hide_certificate_export_link');
if (count($certificate_list) > 0 && $hideCertificateExport !== 'true') {
$url = api_get_self() . '?action=export_all_certificates' . '&' . api_get_cidReq() . '&cat_id=' . $cat_id . '&filter=' . $filterOfficialCode;
echo Display::url(get_lang('ExportAllCertificatesToPDF'), $url, array('class' => 'btn btn-default'));
}
echo '</div>';
echo $filterForm;
if (count($certificate_list) == 0) {
echo Display::display_warning_message(get_lang('NoResultsAvailable'));
} else {
echo '<br /><br /><table class="data_table">';
foreach ($certificate_list as $index => $value) {
echo '<tr>
<td width="100%" class="actions">' . get_lang('Student') . ' : ' . api_get_person_name($value['firstname'], $value['lastname']) . ' (' . $value['username'] . ')</td>';
echo '</tr>';
echo '<tr><td>
<table class="data_table">';
$list_certificate = GradebookUtils::get_list_gradebook_certificates_by_user_id($value['user_id'], $cat_id);
foreach ($list_certificate as $value_certificate) {
echo '<tr>';
echo '<td width="50%">' . get_lang('Score') . ' : ' . $value_certificate['score_certificate'] . '</td>';
echo '<td width="30%">' . get_lang('Date') . ' : ' . api_convert_and_format_date($value_certificate['created_at']) . '</td>';
echo '<td width="20%">';
$url = api_get_path(WEB_PATH) . 'certificates/index.php?id=' . $value_certificate['id'];
示例6: overview
function overview()
{
$platform_charset = api_get_system_encoding();
if ($this->debug > 0) {
error_log('New LP - In learnpath::overview()', 0);
}
global $charset, $_course;
$_SESSION['gradebook'] = Security::remove_XSS($_GET['gradebook']);
$return = '';
if (isset($_REQUEST['curr_id'])) {
$curr_id = $_REQUEST['curr_id'];
}
$tbl_lp_item = Database::get_course_table(TABLE_LP_ITEM);
$sql = "SELECT * FROM " . $tbl_lp_item . "\n\t\t\t\tWHERE lp_id = " . $this->lp_id . " ORDER BY display_order";
$result = api_sql_query($sql, __FILE__, __LINE__);
$arrLP = array();
while ($row = Database::fetch_array($result)) {
// $row['title'] = Security :: remove_XSS(api_convert_encoding($row['title'], $platform_charset, $this->encoding));
// $row['description'] = Security :: remove_XSS(api_convert_encoding($row['description'], $platform_charset, $this->encoding));
$arrLP[] = array('id' => $row['id'], 'item_type' => $row['item_type'], 'title' => $row['title'], 'path' => $row['path'], 'description' => $row['description'], 'parent_item_id' => $row['parent_item_id'], 'previous_item_id' => $row['previous_item_id'], 'next_item_id' => $row['next_item_id'], 'max_score' => $row['max_score'], 'min_score' => $row['min_score'], 'mastery_score' => $row['mastery_score'], 'prerequisite' => $row['prerequisite'], 'display_order' => $row['display_order'], 'audio' => $row['audio']);
}
$this->tree_array($arrLP);
$arrLP = $this->arrMenu;
unset($this->arrMenu);
if (api_is_allowed_to_edit()) {
$gradebook = Security::remove_XSS($_GET['gradebook']);
$author_lang_var = api_convert_encoding(get_lang('Author'), $charset, api_get_system_encoding());
$content_lang_var = api_convert_encoding(get_lang('Content'), $charset, api_get_system_encoding());
$scenario_lang_var = api_convert_encoding(get_lang('Scenario'), $charset, api_get_system_encoding());
$publication_lang_var = api_convert_encoding(get_lang('Publication'), $charset, api_get_system_encoding());
$view_lang_var = api_convert_encoding(get_lang('ViewRight'), $charset, api_get_system_encoding());
$return .= '<div class="actions">';
$return .= '<a href="' . api_get_self() . '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '" title="' . $author_lang_var . '">' . Display::return_icon('pixel.gif', $author_lang_var, array('class' => 'toolactionplaceholdericon toolactionback')) . ' ' . $author_lang_var . '</a>';
$return .= '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&action=add_item&type=step&lp_id=' . Security::remove_XSS($_GET['lp_id']) . '">' . Display::return_icon('pixel.gif', $content_lang_var, array('class' => 'toolactionplaceholdericon toolactionauthorcontent')) . $content_lang_var . '</a>';
$return .= '<a href="lp_controller.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&action=admin_view&lp_id=' . $this->lp_id . '">' . Display::return_icon('pixel.gif', $scenario_lang_var, array('class' => 'toolactionplaceholdericon toolactionauthorscenario')) . $scenario_lang_var . '</a> ';
$return .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&gradebook=&action=edit&lp_id=' . $_SESSION['oLP']->lp_id . '">' . Display::return_icon('pixel.gif', $publication_lang_var, array('class' => 'toolactionplaceholdericon toolsettings')) . $publication_lang_var . '</a>';
$return .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&gradebook=&action=view&lp_id=' . $_SESSION['oLP']->lp_id . '">' . Display::return_icon('pixel.gif', $view_lang_var, array('class' => 'toolactionplaceholdericon toolactionauthorpreview')) . $view_lang_var . '</a>';
$return .= '</div>';
}
// we need to start a form when we want to update all the mp3 files
if ($_GET['updateaudio'] == 'true' and count($arrLP) != 0) {
$return .= '<form action="' . api_get_self() . '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&action=' . Security::remove_XSS($_GET['action']) . '&lp_id=' . Security::remove_XSS($_GET['lp_id']) . '" method="post" enctype="multipart/form-data" name="updatemp3" id="updatemp3">';
$return .= Display::display_warning_message(get_lang('LeaveEmptyToKeepCurrentFile'));
}
$return .= '<div id="content_with_secondary_actions" style="padding:10px 30px 0px 30px;"><div class="rounded" style="width: 100%; padding: 1px;"><table class="gallery" style="width: 100%;"><tr><td><div id="GalleryContainer">';
for ($i = 0; $i < count($arrLP); $i++) {
$id = $arrLP[$i]['id'];
$web_title = $arrLP[$i]['title'];
$title = trim($web_title);
// Unique ID for avoid use the same FLV video for create MP3 files
$title = $title . '_hash_' . uniqid('', true);
$title = str_replace(array(' ', '.'), '_', $title);
$display_order = $arrLP[$i]['display_order'];
$parent_item_id = $arrLP[$i]['parent_item_id'];
$item_type = $arrLP[$i]['item_type'];
if ($item_type == "link") {
$img_type = "../img/navigation/link_48.png";
} elseif ($item_type == "document") {
$img_type = "../img/navigation/doc_48.png";
} elseif ($item_type == "quiz") {
$img_type = "../img/navigation/quiz_48.png";
} elseif ($item_type == "survey") {
$img_type = "../img/navigation/survey_48.png";
} elseif ($item_type == "forum") {
$img_type = "../img/navigation/forum_48.png";
} elseif ($item_type == "student_publication") {
$img_type = "../img/navigation/assignement_48.png";
}
$return .= '<div class="imageBox" id="imageBox' . $id . '">
<div class="imageBox_theImage" style="background-image:url(\'../img/scenario.png\')">
<div style="background-image:url(' . $img_type . ');background-repeat:no-repeat;width:100px;height:100px;background-position: center center;">
<p style="font-size:12px;font:verdana;">' . $web_title . '</p>
</div>
</div>
<div>';
$return .= '<a href="' . api_get_self() . '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&action=edit_item&view=build&id=' . $arrLP[$i]['id'] . '&lp_id=' . $this->lp_id . '&path_item=' . $arrLP[$i]['path'] . '">' . Display::return_icon('pixel.gif', get_lang('Edit'), array('class' => 'actionplaceholdericon actionedit')) . '
</a>
<input type="hidden" name="hdnItemId[]" value="' . $arrLP[$i]['id'] . '">
<input type="hidden" name="hdnItemOrder[]" value="' . ($i + 1) . '">
<a href="' . api_get_self() . '?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&action=delete_item&id=' . $arrLP[$i]['id'] . '&lp_id=' . $this->lp_id . '" onclick="javascript:if(!confirm(\'' . get_lang("ConfirmYourChoice") . '\')) return false;">' . Display::return_icon('pixel.gif', get_lang('Delete'), array('class' => 'actionplaceholdericon actiondelete')) . '
</a>
</div></div>';
}
$return .= '</div>
<div id="insertionMarker">
<img src="../img/marker_top.gif">
<img src="../img/marker_middle.gif" id="insertionMarkerLine">
<img src="../img/marker_bottom.gif">
</div>
<div id="dragDropContent">
</div><div style="clear:both">
</div>';
$return .= '</td></tr>';
if (count($arrLP) > 0) {
$return .= '<tr><td align="right"><form method="post"><div style="clear:both;padding-bottom:10px">';
// $return .= '<button class="save" type="submit" name="savescenario" id="savescenario" value="Save Display Order" onclick="saveImageOrder()">'.get_lang('SaveScenario').'</button>';
$return .= '</div></form></td></tr>';
} else {
$return .= '<tr><td align="center"><a href="' . api_get_self() . '?' . api_get_cidreq() . '&gradebook=&action=add_item&type=step&lp_id=' . $_SESSION['oLP']->lp_id . '">' . api_convert_encoding(get_lang('CourseEmpty'), $charset, api_get_system_encoding()) . '</a></td></tr>';
}
//.........这里部分代码省略.........
示例7: get_table_data
//.........这里部分代码省略.........
$row[] = null;
}
}
$row['child_of'] = $parent_id;
$sortable_data[] = $row;
}
//"Warning row"
if (!empty($data_array)) {
if (api_is_allowed_to_edit()) {
// Compare the category weight to the sum of all weights inside the category
if (intval($total_weight) == $category_weight) {
$label = null;
$total = score_badges(array($total_weight . ' / ' . $category_weight, '100'));
} else {
$label = Display::return_icon('warning.png', sprintf(get_lang('TotalWeightMustBeX'), $category_weight));
$total = Display::badge($total_weight . ' / ' . $category_weight, 'warning');
}
$row = array(null, null, " <h5>" . get_lang('SubTotal') . '</h5>', null, $total . ' ' . $label, 'child_of' => $parent_id);
$sortable_data[] = $row;
}
}
}
}
//end looping categories
}
//end looping categories
if (api_is_allowed_to_edit()) {
if (count($main_cat) > 1) {
$main_weight = intval($main_cat[0]->get_weight());
if (intval($total_categories_weight) == $main_weight) {
$total = score_badges(array($total_categories_weight . ' / ' . $main_weight, '100'));
} else {
$total = Display::badge($total_categories_weight . ' / ' . $main_weight, 'warning');
}
$row = array(null, null, '<h3>' . get_lang('Total') . '</h3>', null, $total);
$sortable_data[] = $row;
}
}
// warning messages
$view = isset($_GET['view']) ? $_GET['view'] : null;
if (api_is_allowed_to_edit()) {
if (isset($_GET['selectcat']) && $_GET['selectcat'] > 0 && $view != 'presence') {
$id_cat = intval($_GET['selectcat']);
$category = Category::load($id_cat);
//$weight_category = intval($this->build_weight($category[0]));
$weight_category = intval($this->build_weight($category[0]));
$course_code = $this->build_course_code($category[0]);
$weight_total_links = round($weight_total_links);
if ($weight_total_links > $weight_category || $weight_total_links < $weight_category || $weight_total_links > $weight_category) {
$warning_message = sprintf(get_lang('TotalWeightMustBeX'), $weight_category);
$modify_icons = '<a class="right_link" href="gradebook_edit_cat.php?editcat=' . $id_cat . '&cidReq=' . $course_code . '">' . Display::return_icon('edit.png', $warning_message, array(), ICON_SIZE_SMALL) . '</a>';
$warning_message .= $modify_icons;
Display::display_warning_message($warning_message, false);
}
$content_html = DocumentManager::replace_user_info_into_html(api_get_user_id(), $course_code);
if (!empty($content_html)) {
$new_content = explode('</head>', $content_html['content']);
}
if (empty($new_content[0])) {
$warning_message = get_lang('ThereIsNotACertificateAvailableByDefault');
$cert_icon = '<a class="right_link" href="../document/document.php?curdirpath=/certificates&' . $course_code . '&origin=gradebook&selectcat=' . $id_cat . '">' . Display::return_icon('certificate.png', get_lang('AttachCertificate'), array(), ICON_SIZE_SMALL) . '</a>';
Display::display_warning_message($warning_message . $cert_icon, false);
}
}
if (empty($_GET['selectcat'])) {
$categories = Category::load();
$weight_categories = $certificate_min_scores = $course_codes = array();
foreach ($categories as $category) {
$course_code_category = $this->build_course_code($category);
if (!empty($course_code)) {
if ($course_code_category == $course_code) {
$weight_categories[] = intval($this->build_weight($category));
$certificate_min_scores[] = intval($this->build_certificate_min_score($category));
$course_codes[] = $course_code;
break;
}
} else {
$weight_categories[] = intval($this->build_weight($category));
$certificate_min_scores[] = intval($this->build_certificate_min_score($category));
$course_codes[] = $course_code_category;
}
}
if (is_array($weight_categories) && is_array($certificate_min_scores) && is_array($course_codes)) {
$warning_message = '';
for ($x = 0; $x < count($weight_categories); $x++) {
$weight_category = intval($weight_categories[$x]);
$certificate_min_score = intval($certificate_min_scores[$x]);
$course_code = $course_codes[$x];
if (empty($certificate_min_score) || $certificate_min_score > $weight_category) {
$warning_message .= $course_code . ' - ' . get_lang('CertificateMinimunScoreIsRequiredAndMustNotBeMoreThan') . ' ' . $weight_category . '<br />';
}
}
if (!empty($warning_message)) {
Display::display_warning_message($warning_message, false);
}
}
}
}
return $sortable_data;
}
示例8: array
if (empty($objQuestionTmp->level)) {
$txtQuestionLevel = '-';
}
$questionLevel = Display::tag('div', $txtQuestionLevel, array('style' => $styleLevel));
// Question score
$questionScore = Display::tag('div', $objQuestionTmp->selectWeighting(), array('style' => $styleScore));
echo '<div id="question_id_list_' . $id . '" >';
echo '<div class="header_operations">';
echo $questionName;
echo $questionType;
echo $questionCategory;
echo $questionLevel;
echo $questionScore;
echo $actions;
echo '</div>';
echo '<div class="question-list-description-block">';
echo '<p class="lead">' . get_lang($question_class) . '</p>';
//echo get_lang('Level').': '.$objQuestionTmp->selectLevel();
ExerciseLib::showQuestion($id, false, null, null, false, true, false, true, $objExercise->feedback_type, true);
echo '</div>';
echo '</div>';
unset($objQuestionTmp);
}
}
}
if (!$nbrQuestions) {
echo Display::display_warning_message(get_lang('NoQuestion'));
}
echo '</div>';
//question list div
}
示例9: check_time_availability
/**
* Check whether this survey has ended. If so, display message and exit rhis script
*/
function check_time_availability($surv_data) {
$start_date = mktime(0, 0, 0, substr($surv_data['start_date'], 5, 2), substr($surv_data['start_date'], 8, 2), substr($surv_data['start_date'], 0, 4));
$end_date = mktime(0, 0, 0, substr($surv_data['end_date'], 5, 2), substr($surv_data['end_date'], 8, 2), substr($surv_data['end_date'], 0, 4));
$cur_date = time();
if ($cur_date < $start_date) {
Display :: display_warning_message(get_lang('SurveyNotAvailableYet'), false);
Display :: display_footer();
exit;
}
if ($cur_date > $end_date) {
Display :: display_warning_message(get_lang('SurveyNotAvailableAnymore'), false);
Display :: display_footer();
exit;
}
}
示例10: isset
$defaults['comment'] = $document_data['comment'];
$defaults['origin'] = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : null;
$defaults['origin_opt'] = isset($_GET['origin_opt']) ? Security::remove_XSS($_GET['origin_opt']) : null;
$form->setDefaults($defaults);
show_return($parent_id, $dir_original, $call_from_tool, $slide_id, $is_certificate_mode);
if ($is_certificate_mode) {
$all_information_by_create_certificate = DocumentManager::get_all_info_to_certificate(api_get_user_id(), api_get_course_id());
$str_info = '';
foreach ($all_information_by_create_certificate[0] as $info_value) {
$str_info .= $info_value . '<br/>';
}
$create_certificate = get_lang('CreateCertificateWithTags');
Display::display_normal_message($create_certificate . ': <br /><br />' . $str_info, false);
}
if ($extension == 'svg' && !api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true') {
Display::display_warning_message(get_lang('BrowserDontSupportsSVG'));
}
echo $form->return_form();
}
Display::display_footer();
/* General functions */
/*
Workhorse functions
These do the actual work that is expected from of this tool, other functions
are only there to support these ones.
*/
/**
This function changes the name of a certain file.
It needs no global variables, it takes all info from parameters.
It returns nothing.
示例11: get_lang
} else {
$resize_info = get_lang('NoResizing') . '<br />';
}
echo '<tr>';
echo '<td align="center">';
echo '<a href="edit_document.php?' . api_get_cidreq() . '&id=' . $row['id'] . '&origin=slideshow&origin_opt=' . $edit_slide_id . '&">
<img src="../img/edit.gif" border="0" title="' . get_lang('Modify') . '" alt="' . get_lang('Modify') . '" /></a><br />';
echo $image_files_only[$slide] . ' <br />';
echo $width . ' x ' . $height . ' <br />';
echo round(filesize($image) / 1024, 2) . ' KB';
echo ' - ' . $ext;
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td align="center">';
echo $resize_info;
echo $resize_widht;
echo $resize_height;
echo '</td>';
echo '</tr>';
}
echo '</table>';
} else {
Display::display_warning_message(get_lang('FileNotFound'));
}
} else {
if ($slide_id != 'all') {
Display::display_warning_message(get_lang('NoDataAvailable'));
}
}
Display::display_footer();
示例12: api_get_user_info
if (isset($_GET['overwritemax'])) {
Display::display_warning_message(get_lang('OverWriteMax'), false);
}
if (isset($_GET['importoverwritescore'])) {
Display::display_confirmation_message(get_lang('ImportOverWriteScore') . ' ' . $_GET['importoverwritescore']);
}
if (isset($_GET['import_user_error'])) {
$userinfo = api_get_user_info($_GET['import_user_error']);
Display::display_warning_message(get_lang('UserInfoDoesNotMatch') . ' ' . api_get_person_name($userinfo['firstname'], $userinfo['lastname']));
}
if (isset($_GET['allresdeleted'])) {
Display::display_confirmation_message(get_lang('AllResultDeleted'));
}
if (isset($_GET['import_score_error'])) {
$userinfo = api_get_user_info($_GET['import_score_error']);
Display::display_warning_message(get_lang('ScoreDoesNotMatch') . ' ' . api_get_person_name($userinfo['firstname'], $userinfo['lastname']));
}
if ($file_type == null) {
//show the result header
if (isset($export_result_form) && !isset($edit_res_form)) {
echo $export_result_form->display();
DisplayGradebook::display_header_result($eval[0], $currentcat[0]->get_id(), 1);
} else {
if (isset($import_result_form)) {
echo $import_result_form->display();
}
if (isset($edit_res_form)) {
echo $edit_res_form->toHtml();
}
DisplayGradebook::display_header_result($eval[0], $currentcat[0]->get_id(), 1);
}
示例13: rmdirr
$result = rmdirr($archive_path, true, true);
if (!empty($htaccess)) {
@file_put_contents($archive_path . '/.htaccess', $htaccess);
}
if ($result) {
$message = 'ArchiveDirCleanupSucceeded';
$type = 'confirmation';
} else {
$message = 'ArchiveDirCleanupFailed';
$type = 'error';
}
header('Location: ' . api_get_self() . '?msg=' . $message . '&type=' . $type);
exit;
}
Display::display_header(get_lang('ArchiveDirCleanup'));
Display::display_warning_message(get_lang('ArchiveDirCleanupDescr'));
if (isset($_GET['msg']) && isset($_GET['type'])) {
if (in_array($_GET['msg'], array('ArchiveDirCleanupSucceeded', 'ArchiveDirCleanupFailed'))) {
switch ($_GET['type']) {
case 'error':
$message = Display::return_message(get_lang($_GET['msg']), 'error');
break;
case 'confirmation':
$message = Display::return_message(get_lang($_GET['msg']), 'confirm');
}
}
}
if (!empty($message)) {
echo $message;
}
$form->display();
示例14: api_get_user_info
if (isset($_GET['overwritemax'])) {
Display::display_warning_message(get_lang('OverWriteMax'), false);
}
if (isset($_GET['importoverwritescore'])) {
Display::display_confirmation_message(get_lang('ImportOverWriteScore') . ' ' . $_GET['importoverwritescore']);
}
if (isset($_GET['import_user_error'])) {
$userinfo = api_get_user_info($_GET['import_user_error']);
Display::display_warning_message(get_lang('UserInfoDoesNotMatch') . ' ' . $userinfo['complete_name']);
}
if (isset($_GET['allresdeleted'])) {
Display::display_confirmation_message(get_lang('AllResultDeleted'));
}
if (isset($_GET['import_score_error'])) {
$userinfo = api_get_user_info($_GET['import_score_error']);
Display::display_warning_message(get_lang('ScoreDoesNotMatch') . ' ' . $userinfo['complete_name']);
}
if ($file_type == null) {
//show the result header
if (isset($export_result_form) && !isset($edit_res_form)) {
echo $export_result_form->display();
DisplayGradebook::display_header_result($eval[0], $currentcat[0]->get_id(), 1);
} else {
if (isset($import_result_form)) {
echo $import_result_form->display();
}
if (isset($edit_res_form)) {
echo $edit_res_form->toHtml();
}
DisplayGradebook::display_header_result($eval[0], $currentcat[0]->get_id(), 1);
}
示例15: elseif
Display::display_confirmation_message(get_lang('RecycleFinished'));
} elseif (Security::check_token('post') && (isset($_POST['recycle_option']) && $_POST['recycle_option'] == 'select_items')) {
// Clear token
Security::clear_token();
$cb = new CourseBuilder();
$course = $cb->build();
// Add token to Course select form
$hiddenFields['sec_token'] = Security::get_token();
CourseSelectForm::display_form($course, $hiddenFields);
} else {
$cb = new CourseBuilder();
$course = $cb->build();
if (!$course->has_resources()) {
echo get_lang('NoResourcesToRecycle');
} else {
Display::display_warning_message(get_lang('RecycleWarning'), false);
$form = new FormValidator('recycle_course', 'post', api_get_self() . '?' . api_get_cidreq());
$form->addElement('header', get_lang('SelectOptionForBackup'));
$form->addElement('radio', 'recycle_option', null, get_lang('FullRecycle'), 'full_backup');
$form->addElement('radio', 'recycle_option', null, get_lang('LetMeSelectItems'), 'select_items');
$form->addButtonSave(get_lang('RecycleCourse'));
$form->setDefaults(array('recycle_option' => 'select_items'));
// Add Security token
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');
$form->setConstants(array('sec_token' => $token));
$form->display();
}
}
// Display the footer
Display::display_footer();