本文整理汇总了PHP中rich_text_editor函数的典型用法代码示例。如果您正苦于以下问题:PHP rich_text_editor函数的具体用法?PHP rich_text_editor怎么用?PHP rich_text_editor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rich_text_editor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_text_form
function display_text_form() {
global $tool_content, $id, $langContent, $langAdd, $course_code;
$tool_content .= "<div class='form-wrapper'><form class='form-horizontal' role='form' action='insert.php?course=$course_code' method='post'>
<input type='hidden' name='id' value='$id'>";
$tool_content .= "<fieldset>
" . rich_text_editor('comments', 4, 20, '') . "
<br />
<input class='btn btn-primary' type='submit' name='submit_text' value='$langAdd'>
</fieldset>
</form></div>";
}
示例2: q
));
$tool_content .= "
<div class='form-wrapper'>
<form class='form-horizontal' role='form' method='post' action='$_SERVER[SCRIPT_NAME]?course=$course_code".(isset($_GET['modifyExercise']) ? "&exerciseId=$exerciseId" : "&NewExercise=Yes")."'>
<fieldset>
<div class='form-group ".(Session::getError('exerciseTitle') ? "has-error" : "")."'>
<label for='exerciseTitle' class='col-sm-2 control-label'>$langExerciseName:</label>
<div class='col-sm-10'>
<input name='exerciseTitle' type='text' class='form-control' id='exerciseTitle' value='" . q($exerciseTitle) . "' placeholder='$langExerciseName'>
<span class='help-block'>".Session::getError('exerciseTitle')."</span>
</div>
</div>
<div class='form-group'>
<label for='exerciseDescription' class='col-sm-2 control-label'>$langExerciseDescription:</label>
<div class='col-sm-10'>
" . rich_text_editor('exerciseDescription', 4, 30, $exerciseDescription) . "
</div>
</div>
<div class='form-group'>
<label for='exerciseDescription' class='col-sm-2 control-label'>$langExerciseType:</label>
<div class='col-sm-10'>
<div class='radio'>
<label>
<input type='radio' name='exerciseType' value='1' ".(($exerciseType <= 1)? 'checked' : '').">
$langSimpleExercise
</label>
</div>
<div class='radio'>
<label>
<input type='radio' name='exerciseType' value='2' ".(($exerciseType >= 2)? 'checked' : '').">
$langSequentialExercise
示例3: forum_category
// --------------------------------
// notify users
// --------------------------------
$subject_notify = "{$logo} - {$langNewForumNotify}";
$category_id = forum_category($forum_id);
$cat_name = category_name($category_id);
$c = course_code_to_title($course_code);
$name = uid_to_name($uid);
$title = course_id_to_title($course_id);
$forum_message = "-------- {$langBodyMessage} ({$langSender}: {$name})\n{$message}--------";
$plain_forum_message = q(html2text($forum_message));
$body_topic_notify = "{$langBodyForumNotify} {$langInForums} '" . q($forum_name) . "' \n {$langInCat} '" . q($cat_name) . "' {$langTo} {$langCourseS} '{$c}' <br /><br />" . q($forum_message) . "<br />\n <br />{$gunet}<br /><a href='{$urlServer}courses/{$course_code}'>{$urlServer}courses/{$course_code}</a>";
$plain_body_topic_notify = "{$langBodyForumNotify} {$langInForums} '" . q($forum_name) . "' {$langInCat} '" . q($cat_name) . "' {$langTo} {$langCourseS} '{$c}' \n\n{$plain_forum_message} \n\n{$gunet}\n<a href='{$urlServer}courses/{$course_code}'>{$urlServer}courses/{$course_code}</a>";
$linkhere = " <a href='{$urlServer}main/profile/emailunsubscribe.php?cid={$course_id}'>{$langHere}</a>.";
$unsubscribe = "<br /><br />{$langNote}: " . sprintf($langLinkUnsubscribe, $title);
$plain_body_topic_notify .= $unsubscribe . $linkhere;
$body_topic_notify .= $unsubscribe . $linkhere;
$sql = Database::get()->queryArray("SELECT DISTINCT user_id FROM forum_notify\n\t\t\tWHERE (forum_id = ?d OR cat_id = ?d)\n\t\t\tAND notify_sent = 1 AND course_id = ?d AND user_id != ?d", $forum_id, $category_id, $course_id, $uid);
foreach ($sql as $r) {
if (get_user_email_notification($r->user_id, $course_id)) {
$emailaddr = uid_to_email($r->user_id);
send_mail_multipart('', '', '', $emailaddr, $subject_notify, $plain_body_topic_notify, $body_topic_notify, $charset);
}
}
// end of notification
Session::Messages($langStored, 'alert-success');
redirect_to_home_page("modules/forum/viewforum.php?course={$course_code}&forum={$forum_id}");
} else {
$tool_content .= "\n <div class='form-wrapper'>\n <form class='form-horizontal' role='form' action='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&topic={$topic}&forum={$forum_id}' method='post'>\n <fieldset>\n <div class='form-group'>\n <label for='subject' class='col-sm-2 control-label'>{$langSubject}:</label>\n <div class='col-sm-10'>\n <input type='text' name='subject' id='subject' class='form-control' maxlength='100'>\n </div>\n </div> \n <div class='form-group'>\n <label for='message' class='col-sm-2 control-label'>{$langBodyMessage}:</label>\n <div class='col-sm-10'>\n " . rich_text_editor('message', 14, 50, '') . "\n </div>\n </div>\n <div class='form-group'>\n <div class='col-sm-10 col-sm-offset-2'>\n <input class='btn btn-primary' type='submit' name='submit' value='{$langSubmit}'>\n <a class='btn btn-default' href='viewforum.php?course={$course_code}&forum={$forum_id}'>{$langCancel}</a>\n </div>\n </div> \n\t</fieldset>\n\t</form>\n </div>";
}
draw($tool_content, 2, null, $head_content);
示例4: rich_text_editor
} else {
$tool_content .= "></td>";
}
$tool_content .= "\n <input type='hidden' name='reponse[1]' value='{$langCorrect}' />\n <td>" . rich_text_editor("comment[1]", 4, 30, @$comment[1], true) . "</td>\n <td><input type='text' name='weighting[1]' value=\"";
if (isset($weighting[1])) {
$tool_content .= q($weighting[1]);
} else {
$tool_content .= 0;
}
$tool_content .= "\" /></td></tr>";
$tool_content .= "<tr>";
$tool_content .= "\n <td valign='top'>{$langFalse}</td>\n <td valign='top'><input type='radio' value='2' name='correct' ";
if (isset($correct) and $correct == 2) {
$tool_content .= "checked='checked' /></td>";
} else {
$tool_content .= "></td>";
}
$tool_content .= "\n <input type='hidden' name='reponse[2]' value='{$langFalse}'>\n <td style='width:100%;'>" . rich_text_editor("comment[2]", 4, 40, @$comment[2]) . "</td>\n <td valign='top'><input type='text' name='weighting[2]' size='5' value=\"";
if (isset($weighting[2])) {
$tool_content .= q($weighting[2]);
} else {
$tool_content .= 0;
}
$tool_content .= "\" /></td></tr>";
$tool_content .= "</table>";
}
$cancel_link = isset($exerciseId) ? "admin.php?course={$course_code}&exerciseId={$exerciseId}" : "question_pool.php?course={$course_code}";
$submit_text = $answerType == FILL_IN_BLANKS && !isset($setWeighting) ? "{$langNext} >" : $langCreate;
$back_button = $answerType == FILL_IN_BLANKS && isset($setWeighting) ? "<input class='btn btn-primary' type='submit' name='buttonBack' value='< {$langBack}'' />" : "";
$tool_content .= "\n <div class='row'>\n <div class='col-sm-10 col-sm-offset-2'>\n {$back_button}\n <input class='btn btn-primary' type='submit' name='submitAnswers' value='{$submit_text}'>\n <a class='btn btn-default' href='{$cancel_link}'>{$langCancel}</a>\n </div>\n </div>\n </fieldset>\n </form>\n </div>\n </div>";
}
示例5: q
} else {
$body_mail = $email_title = '';
// Display form to administrator
$tool_content .= "<div class='form-wrapper'>
<form class='form-horizontal' role='form' action='$_SERVER[SCRIPT_NAME]' method='post'>
<fieldset>
<div class='form-group'>
<label for='email_title' class='col-sm-2 control-label'>$langTitle</label>
<div class='col-sm-10'>
<input class='form-control' type='text' name='email_title' value='$email_title' size='50' />
</div>
</div>
<div class='form-group'>
<label for='body_mail' class='col-sm-2 control-label'>$typeyourmessage</label>
<div class='col-sm-10'>
".rich_text_editor('body_mail', 10, 20, $body_mail)."
</div/>
</div>
<div class='form-group'>
<label for='sendTo' class='col-sm-2 control-label'>$langSendMessageTo</label>
<div class='col-sm-10'>
<select class='form-control' name='sendTo' id='sendTo'>
<option value='1'>$langProfOnly</option>
<option value='2'>$langStudentsOnly</option>
<option value='0'>$langToAllUsers</option>
</select>
</div>
</div>
<div class='col-sm-offset-2 col-sm-10'>
<input class='btn btn-primary' type='submit' name='submit' value='" . q($langSend) . "'>
</div>
示例6: rich_text_editor
}
if (!isset($titleToModify)) {
$titleToModify = '';
}
$tool_content .= "<div class='form-wrapper'>";
$tool_content .= "<form role='form' class='form-horizontal' method='post' action='$_SERVER[SCRIPT_NAME]'>";
if (isset($_GET['modify'])) {
$tool_content .= "<input type='hidden' name='id' value='$id' />";
}
$tool_content .= "<div class='form-group'>";
$tool_content .= "<label for='title' class='col-sm-2 control-label'>$langTitle:</label>
<div class='col-sm-10'><input class='form-control' type='text' name='title' value='$titleToModify' size='50' /></div>
</div>
<div class='form-group'>
<label for='newContent' class='col-sm-2 control-label'>$langAnnouncement:</label>
<div class='col-sm-10'>" . rich_text_editor('newContent', 5, 40, $contentToModify) . "</div></div>";
$tool_content .= "<div class='form-group'><label class='col-sm-2 control-label'>$langLanguage:</label>";
if (isset($_GET['modify'])) {
if (isset($begindate)) {
$start_checkbox = 'checked';
$startdate = $begindate;
} else {
$start_checkbox = '';
$startdate = date('d-m-Y H:i', strtotime('now'));
}
if (isset($enddate)) {
$end_checkbox = 'checked';
} else {
$end_checkbox = '';
$enddate = date('d-m-Y H:i', strtotime('now +1 month'));
}
示例7: rich_text_editor
$htmlPath
$group_hidden_input
$ebook_section_select
$htmlFileName
<div class='form-group".(Session::getError('file_title') ? " has-error" : "")."'>
<label for='file_title' class='col-sm-2 control-label'>$langTitle:</label>
<div class='col-sm-10'>
<input type='text' class='form-control' id='file_title' name='file_title'$htmlTitle>
<span class='help-block'>".Session::getError('file_title')."</span>
</div>
</div>
<div class='form-group'>
<label for='file_title' class='col-sm-2 control-label'>$langContent:</label>
<div class='col-sm-10'>"
. rich_text_editor('file_content', 20, 40, $fileContent) .
"</div>
</div>
<div class='form-group'>
<div class='col-xs-offset-2 col-xs-10'>".
form_buttons(array(
array(
'text' => $langSave,
'value'=> $langSubmit
),
array(
'href' => $backUrl,
)
))
."</div>
示例8: load_js
$require_current_course = true;
$require_editor = true;
$require_help = true;
$helpTopic = '';
require_once '../../include/baseTheme.php';
$pageName = $langEditWeek;
load_js('tools.js');
if (isset($_GET['edit'])) {
// display form for editing course unit
$id = $_GET['edit'];
$cu = Database::get()->querySingle("SELECT id, title, comments FROM course_weekly_view WHERE id = ?d AND course_id = ?d", $id, $course_id);
if (!$cu) {
$pageName = $langUnitUnknown;
$tool_content .= "<div class='alert alert-danger'>{$langUnknownResType}</div>";
draw($tool_content, 2, null, $head_content);
exit;
}
$weektitle = " value='" . htmlspecialchars($cu->title, ENT_QUOTES) . "'";
$weekdescr = $cu->comments;
$week_id = $cu->id;
} else {
$pageName = $langAddWeek;
$weekdescr = $weektitle = '';
}
$action = "{$urlServer}courses/{$course_code}/";
$tool_content .= "<div class='form-wrapper'>\n <form class='form-horizontal' role='form' method='post' action='{$action}' onsubmit=\"return checkrequired(this, 'weektitle');\">";
if (isset($week_id)) {
$tool_content .= "<input type='hidden' name='week_id' value='{$week_id}'>";
}
$tool_content .= "<div class='form-group'>\n <label for='weekTitle' class='col-sm-2 control-label'>{$langWeekTitle}:</label>\n <div class='col-sm-10'>\n <input type='text' class='form-control' id='weekTitle' name='weektitle' {$weektitle}>\n </div>\n </div>\n <div class='form-group'>\n <label class='col-sm-2 control-label'>{$langUnitDescr}</label>\n <div class='col-sm-10'>\n " . rich_text_editor('weekdescr', 10, 20, $weekdescr) . "\n </div>\n </div>\n <div class='form-group'>\n <div class='col-sm-offset-5 col-sm-12'>\n <input class='btn btn-primary' type='submit' name='edit_submitW' value='" . q($langSubmit) . "'>\n </div>\n </div> \n </form>\n </div>";
draw($tool_content, 2, null, $head_content);
示例9: rich_text_editor
<table class='table'>
<tr>
<td colspan='2'><b>$langAnswer</b></td>
<td class='text-center'><b>$langComment</b></td>
<td class='text-center'><b>$langQuestionWeighting</b></td>
</tr>
<tr>
<td valign='top' width='30'>$langCorrect</td>
<td valign='top' width='1'><input type='radio' value='1' name='correct'$setChecked[1]></td>
<td>" . rich_text_editor('comment[1]', 4, 30, @$comment[1], true) . "</td>
<td><input class='form-control' type='text' name='weighting[1]' value='$setWeighting[1]'></td>
</tr>
<tr>
<td>$langFalse</td>
<td><input type='radio' value='2' name='correct'$setChecked[2]></td>
<td>" . rich_text_editor("comment[2]", 4, 40, @$comment[2]) . "</td>
<td><input class='form-control' type='text' name='weighting[2]' size='5' value='$setWeighting[2]'></td>
</tr>
</table>";
}
$cancel_link = isset($exerciseId) ? "admin.php?course=$course_code&exerciseId=$exerciseId" : "question_pool.php?course=$course_code";
$submit_text = ($answerType == FILL_IN_BLANKS || $answerType == FILL_IN_BLANKS_TOLERANT) && !isset($setWeighting) ? "$langNext >" : $langCreate;
$back_button = ($answerType == FILL_IN_BLANKS || $answerType == FILL_IN_BLANKS_TOLERANT) && isset($setWeighting) ? "<input class='btn btn-primary' type='submit' name='buttonBack' value='< $langBack'' />" : "";
$tool_content .= "
<div class='row'>
<div class='col-sm-10 col-sm-offset-2'>
$back_button
<input class='btn btn-primary' type='submit' name='submitAnswers' value='$submit_text'>
<a class='btn btn-default' href='$cancel_link'>$langCancel</a>
</div>
示例10: validateUploadedFile
validateUploadedFile($file_name, 2);
$i = 0;
while (is_file("{$webDir}/courses/{$course_code}/image/{$file_name}")) {
$i++;
$name = pathinfo($file_name, PATHINFO_FILENAME);
$ext = get_file_extension($file_name);
$file_name = "{$name}-{$i}.{$ext}";
}
move_uploaded_file($_FILES['course_image']['tmp_name'], "{$webDir}/courses/{$course_code}/image/{$file_name}");
$extra_sql = ", course_image = ?s";
array_push($db_vars, $file_name);
}
array_push($db_vars, $course_id);
Database::get()->query("UPDATE course SET description = ?s, home_layout = ?d{$extra_sql} WHERE id = ?d", $db_vars);
// update index
require_once 'modules/search/indexer.class.php';
Indexer::queueAsync(Indexer::REQUEST_STORE, Indexer::RESOURCE_COURSE, $course_id);
header("Location: {$urlServer}courses/{$course_code}");
exit;
}
$head_content .= "\n <script>\n \$(function(){\n \$('select[name=layout]').change(function ()\n {\n if(\$(this).val() == 1) {\n \$('#image_field').removeClass('hidden');\n } else {\n \$('#image_field').addClass('hidden');\n }\n }); \n });\n </script>";
$layouts = array(1 => $langCourseLayout1, 2 => $langCourseLayout2, 3 => $langCourseLayout3);
$description = $course->description;
$layout = $course->home_layout;
if (isset($course->course_image)) {
$course_image = "\n <img src='{$urlAppend}courses/{$course_code}/image/{$course->course_image}' style='max-height:100px;max-width:150px;'>   <a class='btn btn-xs btn-danger' href='{$_SERVER['SCRIPT_NAME']}?delete_image=true'>{$langDelete}</a>\n <input type='hidden' name='course_image' value='{$course->course_image}'>\n ";
} else {
$course_image = "<input type='file' name='course_image' id='course_image'>";
}
$tool_content = action_bar(array(array('title' => $langBack, 'url' => $urlAppend . "courses/" . $course_code, 'icon' => 'fa-reply', 'level' => 'primary-label'))) . "\n <div class='row'>\n <div class='col-xs-12'>\n <div class='form-wrapper'>\n <form class='form-horizontal' role='form' method='post' action='editdesc.php?course={$course_code}' enctype='multipart/form-data'>\n <fieldset>\n <div class='form-group'>\n <label for='description' class='col-sm-2 control-label'>{$langCourseLayout}:</label>\n <div class='col-sm-10'>\n " . selection($layouts, 'layout', $layout, 'class="form-control"') . "\n </div>\n </div>\n <div id='image_field' class='form-group" . ($layout == 1 ? "" : " hidden") . "'>\n <label for='course_image' class='col-sm-2 control-label'>{$langCourseImage}:</label>\n <div class='col-sm-10'>\n {$course_image}\n </div>\n </div> \n <div class='form-group'>\n <label for='description' class='col-sm-2 control-label'>{$langDescription}:</label>\n <div class='col-sm-10'>\n " . rich_text_editor('description', 8, 20, $description) . "\n </div>\n </div>\n <div class='form-group'>\n <div class='col-sm-10 col-sm-offset-2'>\n <input class='btn btn-primary' type='submit' name='submit' value='{$langSubmit}'>\n <a href='{$urlAppend}courses/{$course_code}' class='btn btn-default'>{$langCancel}</a>\n </div>\n </div>\n </fieldset>\n </form>\n </div></div></div>";
draw($tool_content, 2, null, $head_content);
示例11: load_js
$contentToModify = "";
}
if (!isset($titleToModify)) {
$titleToModify = "";
}
if (!isset($showFrom)) {
$showFrom = "";
}
if (!isset($showUntil)) {
$showUntil = "";
}
load_js('bootstrap-datepicker');
$head_content .= "\n <script type='text/javascript'>\n \$(function() {\n \$('#startdate').datepicker({\n format: 'dd-mm-yyyy',\n language: '{$language}',\n autoclose: true\n });\n \$('#enddate').datepicker({\n format: 'dd-mm-yyyy',\n language: '{$language}',\n autoclose: true\n });\n });" . "</script>";
$tool_content .= action_bar(array(array('title' => $langBack, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}", 'icon' => 'fa-reply', 'level' => 'primary-label')));
$tool_content .= "<div class='form-wrapper'>";
$tool_content .= "<form class='form-horizontal' role='form' method='post' action='{$_SERVER['SCRIPT_NAME']}?course=" . $course_code . "' onsubmit=\"return checkrequired(this, 'antitle');\">\n <fieldset>\n <div class='form-group'>\n <label for='AnnTitle' class='col-sm-2 control-label'>{$langAnnTitle}:</label>\n <div class='col-sm-10'>\n <input class='form-control' type='text' name='antitle' value='{$titleToModify}' size='50' />\n </div>\n </div>\n <div class='form-group'>\n <label for='AnnBody' class='col-sm-2 control-label'>{$langAnnBody}:</label>\n <div class='col-sm-10'>" . rich_text_editor('newContent', 4, 20, $contentToModify) . "</div>\n </div>\n <div class='form-group'><label for='Email' class='col-sm-offset-2 col-sm-12 control-panel'>{$langEmailOption}:</label></div>\n <div class='form-group'>\n <div class='col-sm-offset-2 col-sm-10'>\n <select class='form-control' name='recipients[]' multiple class='form-control' id='select-recipients'>";
$course_users = Database::get()->queryArray("SELECT cu.user_id, CONCAT(u.surname, ' ', u.givenname) name, u.email FROM course_user cu JOIN user u ON cu.user_id=u.id WHERE cu.course_id = ?d AND u.email<>'' AND u.email IS NOT NULL ORDER BY u.surname, u.givenname", $course_id);
foreach ($course_users as $cu) {
$tool_content .= "<option value='" . q($cu->user_id) . "'>" . q($cu->name) . " (" . q($cu->email) . ")</option>";
}
$tool_content .= "</select>\n <a href='#' id='selectAll'>{$langJQCheckAll}</a> | <a href='#' id='removeAll'>{$langJQUncheckAll}</a>\n </div>\n </div>\n <div class='form-group'><label for='Email' class='col-sm-offset-2 col-sm-12 control-panel'>{$langAnnouncementActivePeriod}:</label></div>\n \n <div class='form-group'>\n <label for='From' class='col-sm-2 control-label'>{$langFrom}:</label>\n <div class='col-sm-10'><input class='form-control' type='text' name='startdate' id='startdate' value='{$showFrom}'></div>\n </div>\n <div class='form-group'>\n <label for='From' class='col-sm-2 control-label'>{$langUntil}:</label>\n <div class='col-sm-10'><input class='form-control' type='text' name='enddate' id='enddate' value='{$showUntil}'></div>\n </div>\n <div class='col-sm-offset-2 col-sm-10'>\n <input class='btn btn-primary' type='submit' name='submitAnnouncement' value='" . q($langAdd) . "' />\n <a href='{$_SERVER['SCRIPT_NAME']}?course={$course_code}' class='btn btn-default'>{$langCancel}</a>\n </div> \n <input type='hidden' name='id' value='{$AnnouncementToModify}'>\n </fieldset>\n </form>\n </div>";
} else {
if (isset($_GET['an_id'])) {
$tool_content .= action_bar(array(array('title' => $langModify, 'url' => $_SERVER['SCRIPT_NAME'] . "?course=" . $course_code . "&modify={$row->id}", 'icon' => 'fa-edit', 'level' => 'primary-label'), array('title' => $langDelete, 'url' => $_SERVER['SCRIPT_NAME'] . "?course=" . $course_code . "&delete={$row->id}", 'icon' => 'fa-times', 'level' => 'primary', 'confirm' => $langSureToDelAnnounce)));
} else {
$tool_content .= action_bar(array(array('title' => $langAddAnn, 'url' => $_SERVER['SCRIPT_NAME'] . "?course=" . $course_code . "&addAnnounce=1", 'icon' => 'fa-plus-circle', 'level' => 'primary-label', 'button-class' => 'btn-success')));
}
}
}
// end: teacher only
/* display announcements */
示例12: date
}
$gradebookActivityToModify = $id;
} else {
//new activity
$gradebookActivityToModify = "";
$activity_type = "";
$date = date("Y-n-j", time());
}
if (!isset($contentToModify)) {
$contentToModify = "";
}
@($tool_content .= "\n <div class='form-group'>\n <label for='activity_type' class='col-sm-2 control-label'>{$langGradebookType}:</label>\n <div class='col-sm-10'>\n <select name='activity_type' class='form-control'>\n <option value='' " . typeSelected($activity_type, '') . " >-</option>\n <option value='4' " . typeSelected($activity_type, 4) . " >" . $gradebook_exams . "</option>\n <option value='2' " . typeSelected($activity_type, 2) . " >" . $gradebook_labs . "</option>\n <option value='1' " . typeSelected($activity_type, 1) . " >" . $gradebook_oral . "</option>\n <option value='3' " . typeSelected($activity_type, 3) . " >" . $gradebook_progress . "</option>\n <option value='5' " . typeSelected($activity_type, 5) . " >" . $gradebook_other_type . "</option>\n </select>\n </div>\n </div>\n <div class='form-group'>\n <label for='actTitle' class='col-sm-2 control-label'>{$langTitle}:</label>\n <div class='col-sm-10'>\n <input type='text' class='form-control' name='actTitle' value='{$titleToModify}'/>\n </div>\n </div>\n <div class='form-group'>\n <label for='date' class='col-sm-2 control-label'>{$langGradebookActivityDate2}:</label>\n <div class='col-sm-10'>\n <input type='text' class='form-control' name='date' value='" . datetime_remove_seconds($date) . "'/>\n </div>\n </div>\n <div class='form-group'>\n <label for='weight' class='col-sm-2 control-label'>{$langGradebookActivityWeight}:</label>\n <div class='col-sm-10'>\n <input type='text' class='form-control' name='weight' value='{$weight}' size='5' /> (" . weightleft($gradebook_id, '') . " % {$langGradebookActivityWeightLeft})\n </div>\n </div>\n <div class='form-group'>\n <label for='visible' class='col-sm-2 control-label'>{$langGradeVisible}</label>\n <div class='col-sm-10'>\n <input type='checkbox' class='form-control' id='visible' name='visible' value='1'");
if ($visible) {
$tool_content .= " checked";
}
$tool_content .= " /></div>\n </div>\n <div class='form-group'>\n <label for='actDesc' class='col-sm-2 control-label'>{$langGradebookActivityWeight}:</label>\n <div class='col-sm-10'>\n " . rich_text_editor('actDesc', 4, 20, $contentToModify) . "\n </div>\n </div>";
if (isset($module_auto_id)) {
//accept the auto booking mechanism
$tool_content .= "<div class='form-group'>\n <label for='weight' class='col-sm-2 control-label'>{$langGradebookInsAut}:</label> \n <div class='col-sm-10'><input type='checkbox' class='form-control' value='1' name='auto' ";
if ($auto) {
$tool_content .= " checked";
}
$tool_content .= "\n /></div>";
}
$tool_content .= "<div class='col-sm-offset-2 col-sm-10'>\n <input class='btn btn-primary' type='submit' name='submitGradebookActivity' value='{$langAdd}' />\n </div>";
if (isset($_GET['modify'])) {
$tool_content .= "<input type='hidden' name='id' value='" . $gradebookActivityToModify . "' />";
} else {
$tool_content .= " <input type='hidden' name='id' value='' />";
}
$tool_content .= "</fieldset>\n </form>\n </div>\n </div>\n </div>";
示例13: array
$navigation[] = array('url' => "admin.php?course={$course_code}&pid={$pid}&editQuestion={$question->pqid}", 'name' => $langPollManagement);
} else {
$pageName = $langNewQu;
}
$action_url = "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&pid={$pid}" . (isset($_GET['modifyQuestion']) ? "&modifyQuestion={$question->pqid}" : "&newQuestion=yes");
$action_url .= isset($_GET['questionType']) ? '&questionType=label' : '';
$tool_content .= action_bar(array(array('title' => $langBack, 'level' => 'primary-label', 'url' => "admin.php?course={$course_code}&pid={$pid}" . (isset($_GET['modifyQuestion']) ? "&editQuestion=" . $_GET['modifyQuestion'] : ""), 'icon' => 'fa-reply')));
$questionName = Session::has('questionName') ? Session::get('questionName') : (isset($question) ? $question->question_text : '');
$questionNameError = Session::getError('questionName');
$questionNameErrorClass = $questionNameError ? "has-error" : "";
$answerType = Session::has('answerType') ? Session::get('answerType') : (isset($question) ? $question->qtype : '');
$questionScale = Session::has('questionScale') ? Session::get('questionScale') : (isset($question) ? $question->q_scale : 5);
$questionScaleError = Session::getError('questionScale');
$questionScaleErrorClass = $questionScaleError ? " has-error" : "";
$questionScaleShowHide = $answerType == QTYPE_SCALE ? "" : " hidden";
$tool_content .= "<div class='form-wrapper'><form class='form-horizontal' role='form' action='{$action_url}' method='post'>\r\n\t<fieldset>\r\n <div class='form-group {$questionNameErrorClass}'>\r\n <label for='questionName' class='col-sm-2 control-label'>" . (isset($_GET['questionType']) ? $langLabel : $langQuestion) . ":</label>\r\n <div class='col-sm-10'>\r\n " . (isset($_GET['questionType']) || isset($question) && $question->qtype == QTYPE_LABEL ? rich_text_editor('questionName', 10, 10, $questionName) : "<input type='text' class='form-control' id='questionName' name='questionName' value='" . q($questionName) . "'>") . "\r\n <span class='help-block'>{$questionNameError}</span> \r\n </div>\r\n </div>";
if (isset($_GET['questionType']) || isset($question) && $question->qtype == QTYPE_LABEL) {
$tool_content .= "<input type='hidden' name='answerType' value='" . QTYPE_LABEL . "'>";
} else {
$head_content .= "<script type='text/javascript'>\r\n \$(function() {\r\n \$('.answerType').change(function() {\r\n if(\$(this).val()==5){\r\n \$('#questionScale').prop('disabled', false);\r\n \$('#questionScale').closest('div.form-group').removeClass('hidden');\r\n } else {\r\n \$('#questionScale').prop('disabled', true);\r\n \$('#questionScale').closest('div.form-group').addClass('hidden');\r\n }\r\n }); \r\n });\r\n </script>";
$tool_content .= "\r\n <div class='form-group'>\r\n <label for='answerType' class='col-sm-2 control-label'>{$langExerciseType}:</label>\r\n <div class='col-sm-10'> \r\n <div class='radio'>\r\n <label>\r\n <input type='radio' name='answerType' class='answerType' value='1' value='" . QTYPE_SINGLE . "' " . ($answerType == QTYPE_SINGLE || !isset($question) ? 'checked' : '') . ">\r\n " . $aType[QTYPE_SINGLE - 1] . "\r\n </label>\r\n </div>\r\n <div class='radio'>\r\n <label>\r\n <input type='radio' name='answerType' class='answerType' value='" . QTYPE_MULTIPLE . "' " . ($answerType == QTYPE_MULTIPLE ? 'checked' : '') . ">\r\n " . $aType[QTYPE_MULTIPLE - 1] . "\r\n </label>\r\n </div>\r\n <div class='radio'>\r\n <label>\r\n <input type='radio' name='answerType' class='answerType' value='" . QTYPE_FILL . "' " . ($answerType == QTYPE_FILL ? 'checked' : '') . ">\r\n " . $aType[QTYPE_FILL - 1] . "\r\n </label>\r\n </div>\r\n <div class='radio'>\r\n <label>\r\n <input type='radio' name='answerType' class='answerType' value='" . QTYPE_SCALE . "' " . ($answerType == QTYPE_SCALE ? 'checked' : '') . ">\r\n " . $aType[QTYPE_SCALE - 1] . "\r\n </label>\r\n </div> \r\n </div> \r\n </div>\r\n <div class='form-group{$questionScaleErrorClass}{$questionScaleShowHide}'>\r\n <label for='questionName' class='col-sm-2 control-label'>{$langMax} {$langScale} (1-..):</label>\r\n <div class='col-sm-10 col-md-3'>\r\n <input type='text' class='form-control' name='questionScale' id='questionScale' value='" . q($questionScale) . "'>\r\n <span class='help-block'>{$questionScaleError}</span> \r\n </div>\r\n </div>";
}
$tool_content .= "\r\n <div class='col-md-10 col-md-offset-2'>\r\n <input type='submit' class='btn btn-primary' name='submitQuestion' value='" . (isset($_GET['newQuestion']) ? $langCreate : $langModify) . "'>\r\n <a href='admin.php?course={$course_code}&pid={$pid}" . (isset($_GET['modifyQuestion']) ? "&editQuestion=" . $_GET['modifyQuestion'] : "") . "' class='btn btn-default'>{$langCancel}</a>\r\n </div>\r\n </fieldset>\r\n </form></div>";
//Modify Answers
} elseif (isset($_GET['modifyAnswers'])) {
$head_content .= "\r\n <script>\r\n \$(function() {\r\n \$(poll_init);\r\n });\r\n </script>\r\n ";
$question_id = $_GET['modifyAnswers'];
$question = Database::get()->querySingle('SELECT * FROM poll_question WHERE pid = ?d AND pqid = ?d', $pid, $question_id);
$answers = Database::get()->queryArray("SELECT * FROM poll_question_answer\r\n\t\t\t\t\tWHERE pqid = ?d ORDER BY pqaid", $question->pqid);
if (!$question || $question->qtype == QTYPE_LABEL || $question->qtype == QTYPE_FILL || $question->qtype == QTYPE_SCALE) {
redirect_to_home_page("modules/questionnaire/admin.php?course={$course_code}&pid={$pid}");
示例14: q
<select name='category' id='questionCat' class='form-control'>
$options
</select>
</div>
</div>
<div class='form-group ".(Session::getError('questionName') ? "has-error" : "")."'>
<label for='questionName' class='col-sm-2 control-label'>$langQuestion:</label>
<div class='col-sm-10'>
<input name='questionName' type='text' class='form-control' id='questionName' placeholder='$langQuestion' value='" . q($questionName) . "'>
<span class='help-block'>".Session::getError('questionName')."</span>
</div>
</div>
<div class='form-group'>
<label for='questionDescription' class='col-sm-2 control-label'>$langQuestionDescription:</label>
<div class='col-sm-10'>
". rich_text_editor('questionDescription', 4, 50, $questionDescription) ."
</div>
</div>
<div class='form-group'>
<label for='questionDifficulty' class='col-sm-2 control-label'>$langQuestionDiffGrade:</label>
<div class='col-sm-10'>
<input id='questionDifficulty' name='difficulty' data-slider-id='ex1Slider' type='text' data-slider-min='0' data-slider-max='5' data-slider-step='1' data-slider-value='$difficulty'/>
</div>
<div class='col-sm-1'>
<span id='questionDifficultyValue' class='label label-default'></span>
</div>
</div>
<div class='form-group'>
<label for='imageUpload' class='col-sm-2 control-label'>".(($okPicture) ? $langReplacePicture : $langAddPicture).":</label>
<div class='col-sm-10'>" .
(($okPicture) ? "<img src='../../$picturePath/quiz-$questionId'><br><br>" : "") .
示例15: checkrequired
'level' => 'primary-label')),false);
$tool_content .= "<div class='form-wrapper'>
<form class='form-horizontal' role='form' method='post' action='index.php?course=$course_code$actionAppend' onsubmit=\"return checkrequired(this, 'unittitle');\">";
if (isset($unit_id)) {
$tool_content .= "<input type='hidden' name='unit_id' value='$unit_id'>";
}
$tool_content .= "<div class='form-group'>
<label for='unitTitle' class='col-sm-2 control-label'>$langTitle</label>
<div class='col-sm-10'>
<input type='text' class='form-control' id='unitTitle' name='unittitle' $unittitle>
</div>
</div>
<div class='form-group'>
<label for='unitdescr' class='col-sm-2 control-label'>$langUnitDescr</label>
<div class='col-sm-10'>
" . rich_text_editor('unitdescr', 10, 20, $unitdescr) . "
</div>
</div>
" . $tagsInput . "
<div class='form-group'>
<div class='col-sm-10 col-sm-offset-2'>
<input class='btn btn-primary' type='submit' name='edit_submit' value='" . q($langSubmit) . "'>
</div>
</div>
</form>
</div>";
draw($tool_content, 2, null, $head_content);