• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP print_textarea函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中print_textarea函数的典型用法代码示例。如果您正苦于以下问题:PHP print_textarea函数的具体用法?PHP print_textarea怎么用?PHP print_textarea使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: wiki_print_editor_wiki

/**
 * Printing wiki editor.
 * Depending on where it is called , action will go to different destinations.
 * If it is called from comments section, the return will be in comments section
 *  in any other case it will be in edit view section.
 * @param $pageid. Current pageid
 * @param $content. Content to be edited.
 * @param $section. Current section, default null
 * @param $comesfrom. Information about where the function call is made
 * @param commentid. id comment of comment that will be edited.
 */

function wiki_print_editor_wiki($pageid, $content, $editor, $version = -1, $section = null, $upload = false, $deleteuploads = array(), $comesfrom = 'editorview', $commentid = 0) {
    global $CFG, $OUTPUT, $PAGE;

    if ($comesfrom == 'editcomments') {
        $action = $CFG->wwwroot . '/mod/wiki/instancecomments.php?pageid=' . $pageid . '&id=' . $commentid . '&action=edit';
    } else if ($comesfrom == 'addcomments') {
        $action = $CFG->wwwroot . '/mod/wiki/instancecomments.php?pageid=' . $pageid . '&id=' . $commentid . '&action=add';
    } else {
        $action = $CFG->wwwroot . '/mod/wiki/edit.php?pageid=' . $pageid;
    }

    if (!empty($section)) {
        $action .= "&section=" . urlencode($section);
    }

    ///Get tags for every element we are displaying
    $tag = getTokens($editor, 'bold');
    $wiki_editor['bold'] = array('ed_bold.gif', get_string('wikiboldtext', 'wiki'), $tag[0], $tag[1], get_string('wikiboldtext', 'wiki'));
    $tag = getTokens($editor, 'italic');
    $wiki_editor['italic'] = array('ed_italic.gif', get_string('wikiitalictext', 'wiki'), $tag[0], $tag[1], get_string('wikiitalictext', 'wiki'));
    $tag = getTokens($editor, 'link');
    $wiki_editor['internal'] = array('ed_internal.gif', get_string('wikiinternalurl', 'wiki'), $tag[0], $tag[1], get_string('wikiinternalurl', 'wiki'));
    $tag = getTokens($editor, 'url');
    $wiki_editor['external'] = array('ed_external.gif', get_string('wikiexternalurl', 'wiki'), $tag[0], $tag[1], get_string('wikiexternalurl', 'wiki'));
    $tag = getTokens($editor, 'list');
    $wiki_editor['u_list'] = array('ed_ul.gif', get_string('wikiunorderedlist', 'wiki'), '\\n' . $tag[0], '', '');
    $wiki_editor['o_list'] = array('ed_ol.gif', get_string('wikiorderedlist', 'wiki'), '\\n' . $tag[1], '', '');
    $tag = getTokens($editor, 'image');
    $wiki_editor['image'] = array('ed_img.gif', get_string('wikiimage', 'wiki'), $tag[0], $tag[1], get_string('wikiimage', 'wiki'));
    $tag = getTokens($editor, 'header');
    $wiki_editor['h1'] = array('ed_h1.gif', get_string('wikiheader', 'wiki', 1), '\\n' . $tag . ' ', ' ' . $tag . '\\n', get_string('wikiheader', 'wiki', 1));
    $wiki_editor['h2'] = array('ed_h2.gif', get_string('wikiheader', 'wiki', 2), '\\n' . $tag . $tag . ' ', ' ' . $tag . $tag . '\\n', get_string('wikiheader', 'wiki', 2));
    $wiki_editor['h3'] = array('ed_h3.gif', get_string('wikiheader', 'wiki', 3), '\\n' . $tag . $tag . $tag . ' ', ' ' . $tag . $tag . $tag . '\\n', get_string('wikiheader', 'wiki', 3));
    $tag = getTokens($editor, 'line_break');
    $wiki_editor['hr'] = array('ed_hr.gif', get_string('wikihr', 'wiki'), '\\n' . $tag . '\\n', '', '');
    $tag = getTokens($editor, 'nowiki');
    $wiki_editor['nowiki'] = array('ed_nowiki.gif', get_string('wikinowikitext', 'wiki'), $tag[0], $tag[1], get_string('wikinowikitext', 'wiki'));

    $OUTPUT->heading(strtoupper(get_string('format' . $editor, 'wiki')), 3);

    $PAGE->requires->js('/mod/wiki/editors/wiki/buttons.js');

    echo $OUTPUT->container_start();
    foreach ($wiki_editor as $button) {
        echo "<a href=\"javascript:insertTags";
        echo "('" . $button[2] . "','" . $button[3] . "','" . $button[4] . "');\">";
        echo "<img width=\"23\" height=\"22\" src=\"$CFG->wwwroot/mod/wiki/editors/wiki/images/$button[0]\" alt=\"" . $button[1] . "\" title=\"" . $button[1] . "\" />";
        echo "</a>";
    }
    echo $OUTPUT->container_end();

    echo $OUTPUT->container_start();
    echo '<form method="post" id="mform1" action="' . $action . '">';
    echo $OUTPUT->container(print_textarea(false, 20, 60, 0, 0, "newcontent", $content, 0, true), false, 'wiki_editor');
    echo $OUTPUT->container_start();
    wiki_print_edit_form_default_fields($editor, $pageid, $version, $upload, $deleteuploads);
    echo $OUTPUT->container_end();
    echo '</form>';
    echo $OUTPUT->container_end();
}
开发者ID:rezaies,项目名称:moodle,代码行数:72,代码来源:wiki_editor.php


示例2: gen_textarea

 function gen_textarea($usehtmleditor, $text = '')
 {
     // MDL-16018: Don't print htmlarea with < 7 lines height, causes visualization problem
     $text = clean_text($text);
     $this->field->param3 = $usehtmleditor && $this->field->param3 < 7 ? 7 : $this->field->param3;
     return print_textarea($usehtmleditor, $this->field->param3, $this->field->param2, '', '', 'field_' . $this->field->id, $text, '', true, 'field_' . $this->field->id);
 }
开发者ID:edwinphillips,项目名称:moodle-485cb39,代码行数:7,代码来源:field.class.php


示例3: toHtml

 /**
  * Returns the input field in HTML
  *
  * @return string
  */
 function toHtml()
 {
     if ($this->_flagFrozen) {
         return $this->getFrozenHtml();
     } else {
         return $this->_getTabs() . print_textarea(true, $this->_options['rows'], $this->_options['cols'], $this->_options['width'], $this->_options['height'], $this->getName(), preg_replace("/(\r\n|\n|\r)/", '&#010;', $this->getValue()), 0, true, $this->getAttribute('id'));
     }
 }
开发者ID:alanaipe2015,项目名称:moodle,代码行数:13,代码来源:htmleditor.php


示例4: view

 function view($editable, $issueid = 0)
 {
     $this->getvalue($issueid);
     if ($editable) {
         print_textarea(true, 10, 60, 680, 400, "element{$this->name}", $this->value);
     } else {
         echo format_text(format_string($this->value), $this->format);
     }
 }
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:9,代码来源:textarea.class.php


示例5: dbmgr_main

function dbmgr_main()
{
    echo '<link rel="stylesheet" href="include/styles/dbmanager.css" type="text/css" />';
    $sql = (string) get_parameter('sql');
    $clean_output = get_parameter("clean_output", 0);
    if ($clean_output == 0) {
        echo "<h1>" . __('Extensions') . " &raquo; " . __('Database interface');
        $html_report_image = print_html_report_image("index.php?sec=godmode&sec2=godmode/setup/dbmanager&sql={$sql}", __("Report"));
        if ($html_report_image) {
            echo "&nbsp;&nbsp;" . $html_report_image;
        }
        echo "</h1>";
        echo '<div class="note_simple">';
        echo __("This is an advanced extension to interface with Integria IMS database directly using native SQL sentences. Please note that <b>you can damage</b> your Integria IMS installation if you don't know </b>exactly</b> what are you doing, this means that you can severily damage your setup using this extension. This extension is intended to be used <b>only by experienced users</b> with a depth knowledgue of Integria IMS.");
        echo '</div>';
        echo "<br />";
        echo __("Some samples of usage:") . " <blockquote><em>SHOW STATUS;<br />DESCRIBE tincidencia<br />SELECT * FROM tincidencia<br />UPDATE tincidencia SET sla_disabled = 1 WHERE inicio < '2010-01-10 00:00:00';</em></blockquote>";
        echo "<br /><br />";
        echo "<form method='post' action=''>";
        print_textarea('sql', 5, 50, html_entity_decode($sql, ENT_QUOTES));
        echo "<div style='width: 99%; text-align: right; margin-top: 6px;'>";
        print_submit_button(__('Execute SQL'), '', false, 'class="sub next"');
        echo "</div>";
        echo "</form>";
    } else {
        echo "<form method='post' action=''>";
        print_textarea('sql', 2, 40, html_entity_decode($sql, ENT_QUOTES));
        echo "<div style='width: 99%; text-align: right; margin-top: 6px;'>";
        print_submit_button(__('Execute SQL'), '', false, 'class="sub next"');
        echo "</div>";
        echo "</form>";
    }
    // Processing SQL Code
    if ($sql == '') {
        return;
    }
    echo "<br />";
    echo "<hr />";
    echo "<br />";
    $error = '';
    $result = dbmanager_query($sql, $error);
    if ($result === false) {
        echo '<strong>An error has occured when querying the database.</strong><br />';
        echo $error;
        return;
    }
    if (!is_array($result)) {
        echo "<strong>Output: <strong>" . $result;
        return;
    }
    $table->width = '90%';
    $table->class = 'dbmanager';
    $table->head = array_keys($result[0]);
    $table->data = $result;
    print_table($table);
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:56,代码来源:dbmanager.php


示例6: toHtml

 function toHtml()
 {
     //if ($this->_canUseHtmlEditor && !$this->_flagFrozen){
     //    $script = '';
     //} else {
     //    $script='';
     //}
     if ($this->_flagFrozen) {
         return $this->getFrozenHtml();
     } else {
         return $this->_getTabs() . '<input type="hidden" name="filearea" value="' . $this->_options['filearea'] . '" />' . "\n" . print_textarea($this->_canUseHtmlEditor, $this->_options['rows'], $this->_options['cols'], $this->_options['width'], $this->_options['height'], $this->getName(), preg_replace("/(\r\n|\n|\r)/", '&#010;', $this->getValue()), 0, true, $this->getAttribute('id'));
     }
 }
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:13,代码来源:htmleditor.php


示例7: toHtml

 function toHtml()
 {
     //if ($this->_canUseHtmlEditor && !$this->_flagFrozen){
     //    $script = '';
     //} else {
     //    $script='';
     //}
     if ($this->_flagFrozen) {
         return $this->getFrozenHtml();
     } else {
         return $this->_getTabs() . print_textarea($this->_canUseHtmlEditor, $this->_options['rows'], $this->_options['cols'], $this->_options['width'], $this->_options['height'], $this->getName(), preg_replace("/(\r\n|\n|\r)/", '&#010;', $this->getValue()), 0, true, $this->getAttribute('id'));
         //.$script;
     }
 }
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:14,代码来源:htmleditor.php


示例8: toHtml

 function toHtml()
 {
     if ($this->_canUseHtmlEditor && !$this->_flagFrozen) {
         ob_start();
         use_html_editor($this->getName(), '', $this->getAttribute('id'));
         $script = ob_get_clean();
     } else {
         $script = '';
     }
     if ($this->_flagFrozen) {
         return $this->getFrozenHtml();
     } else {
         return $this->_getTabs() . print_textarea($this->_canUseHtmlEditor, $this->_options['rows'], $this->_options['cols'], $this->_options['width'], $this->_options['height'], $this->getName(), preg_replace("/(\r\n|\n|\r)/", '&#010;', $this->getValue()), $this->_options['course'], true, $this->getAttribute('id')) . $script;
     }
 }
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:15,代码来源:htmleditor.php


示例9: wiki_print_editor_html

/**
 * @TODO: Doc this function
 */
function wiki_print_editor_html($pageid, $content, $version = -1, $section = null, $upload = false, $deleteuploads = array())
{
    global $CFG, $OUTPUT;
    $OUTPUT->heading(strtoupper(get_string('formathtml', 'wiki')), 3);
    $action = $CFG->wwwroot . '/mod/wiki/edit.php?pageid=' . $pageid;
    if (!empty($section)) {
        $action .= "&section=" . urlencode($section);
    }
    echo $OUTPUT->container_start('mdl-align');
    echo '<form method="post" action="' . $action . '">';
    echo $OUTPUT->container(print_textarea(true, 20, 100, 0, 0, "newcontent", $content, 0, true, '', 'form-textarea-advanced'), 'wiki_editor');
    wiki_print_edit_form_default_fields('html', $pageid, $version, $upload, $deleteuploads);
    echo '</form>';
    echo $OUTPUT->container_end();
}
开发者ID:evltuma,项目名称:moodle,代码行数:18,代码来源:html.php


示例10: print_question_formulation_and_controls

 function print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options)
 {
     global $CFG;
     static $htmleditorused = false;
     $answers =& $question->options->answers;
     $readonly = empty($options->readonly) ? '' : 'disabled="disabled"';
     // Only use the rich text editor for the first essay question on a page.
     $usehtmleditor = can_use_html_editor() && !$htmleditorused;
     $formatoptions = new stdClass();
     $formatoptions->noclean = true;
     $formatoptions->para = false;
     $inputname = $question->name_prefix;
     $stranswer = get_string("answer", "quiz") . ': ';
     /// set question text and media
     $questiontext = format_text($question->questiontext, $question->questiontextformat, $formatoptions, $cmoptions->course);
     $image = get_question_image($question);
     // feedback handling
     $feedback = '';
     if ($options->feedback && !empty($answers)) {
         foreach ($answers as $answer) {
             $feedback = format_text($answer->feedback, '', $formatoptions, $cmoptions->course);
         }
     }
     // get response value
     if (isset($state->responses[''])) {
         $value = stripslashes_safe($state->responses['']);
     } else {
         $value = "";
     }
     // answer
     if (empty($options->readonly)) {
         // the student needs to type in their answer so print out a text editor
         $answer = print_textarea($usehtmleditor, 18, 80, 630, 400, $inputname, $value, $cmoptions->course, true);
     } else {
         // it is read only, so just format the students answer and output it
         $safeformatoptions = new stdClass();
         $safeformatoptions->para = false;
         $answer = format_text($value, FORMAT_MOODLE, $safeformatoptions, $cmoptions->course);
         $answer = '<div class="answerreview">' . $answer . '</div>';
     }
     include "{$CFG->dirroot}/question/type/essay/display.html";
     if ($usehtmleditor && empty($options->readonly)) {
         use_html_editor($inputname);
         $htmleditorused = true;
     }
 }
开发者ID:r007,项目名称:PMoodle,代码行数:46,代码来源:questiontype.php


示例11: show_edit_label

function show_edit_label($item, $usehtmleditor = false)
{
    $item->presentation = isset($item->presentation) ? $item->presentation : '';
    ?>
   <table style="display:inline">
      <tr><th><?php 
    print_string('label', 'feedback');
    ?>
</th></tr>
      <tr>
         <td>
            <?php 
    print_textarea($usehtmleditor, 20, 60, 680, 400, "presentation", $item->presentation);
    ?>
            <input type="hidden" id="itemname" name="itemname" value="label" />
         </td>
      </tr>
   </table>
   <div style="clear:both"></div>
<?php 
    if ($usehtmleditor) {
        use_html_editor();
    }
}
开发者ID:kai707,项目名称:ITSA-backup,代码行数:24,代码来源:lib.php


示例12: get_db_all_rows_sql

}
// Linked values
$sql = "SELECT id, label\n\t\tFROM tincident_type_field\t\n\t\tWHERE id_incident_type = {$id_incident_type}\n\t\t\tAND type = 'linked'";
$parents_result = get_db_all_rows_sql($sql);
if ($parents_result == false) {
    $parents_result = array();
}
$parents = array();
foreach ($parents_result as $result) {
    $parents[$result['id']] = $result['label'];
}
$table->data['id_parent_value'][0] = print_select($parents, 'parent', $parent, '', __('Select parent'), '0', true, 0, true, __("Parent"), $global_field);
$table->data['id_linked_value'][0] = print_textarea('linked_value', 15, 1, $linked_value, '', true, __('Linked value') . integria_help("linked_values", true), $global_field);
if ($global_field) {
    $table->data['id_linked_value'][1] = "";
    $table->data['id_linked_value'][2] = print_textarea('add_linked_value', 15, 1, $add_linked_value, '', true, __('Add values') . integria_help("linked_values", true));
}
// Buttons
if ($add_field) {
    $button = print_input_hidden('add_field', 1, true);
    $button .= print_submit_button(__('Create'), 'create_btn', false, 'class="sub next"', true);
} else {
    if ($update_field) {
        if (!$global_field && ($type != 'linked' || $type != 'combo') || $global_field && ($type == 'linked' || $type == 'combo')) {
            $button = print_input_hidden('update_field', 1, true);
            $button .= print_input_hidden('add_field', 0, true);
            $button .= print_input_hidden('id_field', $id_field, true);
            $button .= print_submit_button(__('Update'), 'update_btn', false, 'class="sub upd"', true);
        }
    }
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:incident_type_field.php


示例13: print_string

    <tr valign="top">
        <td align="left"><b><?php 
print_string('requirement', 'brainstorm');
?>
:</b></td>
        <td align="right">
			<?php 
if ($brainstorm->oprequirementtype == 0) {
    ?>
            <input type="text" size="60" name="config_requirement" value="<?php 
    echo stripslashes($currentoperator->configdata->requirement);
    ?>
" />
			<?php 
} elseif ($brainstorm->oprequirementtype == 2) {
    print_textarea($usehtmleditor, 20, 50, 680, 400, 'config_requirement', stripslashes($currentoperator->configdata->requirement));
    if (!$usehtmleditor) {
        $brainstorm->oprequirementtype = 1;
    } else {
        $htmleditorneeded = true;
    }
} elseif ($brainstorm->oprequirementtype == 1) {
    ?>
            <textarea style="width:100%;height:150px" name="config_requirement"><?php 
    echo stripslashes($currentoperator->configdata->requirement);
    ?>
</textarea>
			<?php 
}
?>
            <?php 
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:31,代码来源:prepare.php


示例14: __

$table->data[11][1] = "<h4>" . __("Newsletter SMTP Parameters") . "</h4>";
$table->data[12][0] = print_input_text("news_smtp_host", $config["news_smtp_host"], '', 35, 200, true, __('SMTP Host'));
$table->data[12][1] = print_input_text("news_smtp_port", $config["news_smtp_port"], '', 5, 10, true, __('SMTP Port'));
$table->data[13][0] = print_input_text("news_smtp_user", $config["news_smtp_user"], '', 25, 200, true, __('SMTP User'));
$table->data[13][1] = print_input_text("news_smtp_pass", $config["news_smtp_pass"], '', 25, 200, true, __('SMTP Password'));
$table->data[14][0] = print_input_text("news_batch_newsletter", $config["news_batch_newsletter"], '', 4, 255, true, __('Max. emails sent per execution'));
$table->data[14][0] .= print_help_tip(__("This means, in each execution of the batch external process (integria_cron). If you set your cron to execute each hour in each execution of that process will try to send this ammount of emails. If you set the cron to run each 5 min, will try this number of mails."), true);
$table->data[14][1] = print_input_text("batch_email_validation", $config["batch_email_validation"], '', 4, 255, true, __('Newsletter email validation batch'));
$table->data[14][1] .= print_help_tip(__("This means, in each execution of the batch external process (integria_cron) will try to validate this ammount of emails."), true);
$table->data[15][0] = print_checkbox("active_validate", 1, $config["active_validate"], true, __('Activate email validation'));
$table->data[16][1] = "<h4>" . __("Mail general texts") . "</h4>";
$table->colspan[17][0] = 3;
$table->colspan[18][0] = 3;
$table->colspan[19][0] = 3;
$table->data[17][0] = print_textarea("header_email", 5, 40, $config["HEADER_EMAIL"], '', true, __('Email header'));
$table->data[18][0] = print_textarea("footer_email", 5, 40, $config["FOOTER_EMAIL"], '', true, __('Email footer'));
$table->data[19][1] = "<h4>" . __("Mail queue control");
$total_pending = get_db_sql("SELECT COUNT(*) from tpending_mail");
$table->data[19][1] .= " : " . $total_pending . " " . __("mails in queue") . "</h4>";
if ($total_pending > 0) {
    $table->colspan[20][0] = 3;
    $mail_queue = "<div style='height: 250px; overflow-y: auto;'>";
    $mail_queue .= "<table width=100% class=listing>";
    $mail_queue .= "<tr><th>" . __("Date") . "<th>" . __("Recipient") . "<th>" . __("Subject") . "<th>" . __("Attempts") . "<th>" . __("Status") . "</tr>";
    $mails = get_db_all_rows_sql("SELECT * FROM tpending_mail LIMIT 1000");
    foreach ($mails as $mail) {
        $mail_queue .= "<tr>";
        $mail_queue .= "<td style='font-size: 9px;'>";
        $mail_queue .= $mail["date"];
        $mail_queue .= "<td>";
        $mail_queue .= $mail["recipient"];
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:setup_mail.php


示例15: can_use_html_editor

echo '</li>';
echo '</ul>';
echo '</div>';
echo '</div>';
// class="userinfo"
echo '<div id="send">';
echo '<form id="editing" method="post" action="discussion.php">';
$usehtmleditor = can_use_html_editor() && get_user_preferences('message_usehtmleditor', 0);
echo '<h1><label for="edit-message">' . get_string('sendmessage', 'message') . '</label></h1>';
echo '<div>';
if ($usehtmleditor) {
    print_textarea(true, 8, 34, 100, 100, 'message', $refreshedmessage);
    use_html_editor('message', 'formatblock subscript superscript copy cut paste clean undo redo justifyleft justifycenter justifyright justifyfull lefttoright righttoleft insertorderedlist insertunorderedlist outdent indent inserthorizontalrule createanchor nolink inserttable');
    echo '<input type="hidden" name="format" value="' . FORMAT_HTML . '" />';
} else {
    print_textarea(false, 8, 50, 0, 0, 'message', $refreshedmessage);
    echo '<input type="hidden" name="format" value="' . FORMAT_MOODLE . '" />';
}
echo '</div><div>';
echo '<input type="hidden" name="id" value="' . $user->id . '" />';
echo '<input type="hidden" name="start" value="' . $start . '" />';
echo '<input type="hidden" name="noframesjs" value="' . $noframesjs . '" />';
echo '<input type="hidden" name="last" value="' . time() . '" />';
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
echo '<input type="submit" value="' . get_string('sendmessage', 'message') . '" />&nbsp;';
echo '<input type="submit" name="refresh" value="' . get_string('refresh') . '" />';
echo '<input type="checkbox" name="newonly" id="newonly" ' . ($newonly ? 'checked="checked" ' : '') . '/><label for="newonly">' . get_string('newonlymsg', 'message') . '</label>';
echo '</div>';
echo '</form>';
echo '</div>';
echo '<div id="messages">';
开发者ID:veritech,项目名称:pare-project,代码行数:31,代码来源:discussion.php


示例16: sesskey

/// Print the appropriate form
if (file_exists($filename)) {
    // We are in maintenance mode
    echo '<div style="margin-left:auto;margin-right:auto">';
    echo '<form action="maintenance.php" method="post">';
    echo '<input type="hidden" name="action" value="disable" />';
    echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
    echo '<p><input type="submit" value="' . get_string('disable') . '" /></p>';
    echo '</form>';
    echo '</div>';
} else {
    // We are not in maintenance mode
    $usehtmleditor = can_use_html_editor();
    echo '<div style="text-align:center;margin-left:auto;margin-right:auto">';
    echo '<form action="maintenance.php" method="post">';
    echo '<div>';
    echo '<input type="hidden" name="action" value="enable" />';
    echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
    echo '<p><input type="submit" value="' . get_string('enable') . '" /></p>';
    echo '<p>' . get_string('optionalmaintenancemessage', 'admin') . ':</p>';
    echo '<table><tr><td>';
    print_textarea($usehtmleditor, 20, 50, 600, 400, "text");
    echo '</td></tr></table>';
    echo '</div>';
    echo '</form>';
    echo '</div>';
    if ($usehtmleditor) {
        use_html_editor();
    }
}
admin_externalpage_print_footer();
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:maintenance.php


示例17: display_submission


//.........这里部分代码省略.........
     echo '<tr>';
     echo '<td class="picture teacher">';
     if ($submission->teacher) {
         $teacher = get_record('user', 'id', $submission->teacher);
     } else {
         global $USER;
         $teacher = $USER;
     }
     print_user_picture($teacher->id, $this->course->id, $teacher->picture);
     echo '</td>';
     echo '<td class="content">';
     echo '<form id="submitform" action="submissions.php" method="post">';
     echo '<div>';
     // xhtml compatibility - invisiblefieldset was breaking layout here
     echo '<input type="hidden" name="offset" value="' . ($offset + 1) . '" />';
     echo '<input type="hidden" name="userid" value="' . $userid . '" />';
     echo '<input type="hidden" name="id" value="' . $this->cm->id . '" />';
     echo '<input type="hidden" name="mode" value="grade" />';
     echo '<input type="hidden" name="menuindex" value="0" />';
     //selected menu index
     //new hidden field, initialized to -1.
     echo '<input type="hidden" name="saveuserid" value="-1" />';
     if ($submission->timemarked) {
         echo '<div class="from">';
         echo '<div class="fullname">' . fullname($teacher, true) . '</div>';
         echo '<div class="time">' . userdate($submission->timemarked) . '</div>';
         echo '</div>';
     }
     echo '<div class="grade"><label for="menugrade">' . get_string('grade') . '</label> ';
     choose_from_menu(make_grades_menu($this->assignment->grade), 'grade', $submission->grade, get_string('nograde'), '', -1, false, $disabled);
     echo '</div>';
     echo '<div class="clearer"></div>';
     echo '<div class="finalgrade">' . get_string('finalgrade', 'grades') . ': ' . $grading_info->items[0]->grades[$userid]->str_grade . '</div>';
     echo '<div class="clearer"></div>';
     if (!empty($CFG->enableoutcomes)) {
         foreach ($grading_info->outcomes as $n => $outcome) {
             echo '<div class="outcome"><label for="menuoutcome_' . $n . '">' . $outcome->name . '</label> ';
             $options = make_grades_menu(-$outcome->scaleid);
             if ($outcome->grades[$submission->userid]->locked) {
                 $options[0] = get_string('nooutcome', 'grades');
                 echo $options[$outcome->grades[$submission->userid]->grade];
             } else {
                 choose_from_menu($options, 'outcome_' . $n . '[' . $userid . ']', $outcome->grades[$submission->userid]->grade, get_string('nooutcome', 'grades'), '', 0, false, false, 0, 'menuoutcome_' . $n);
             }
             echo '</div>';
             echo '<div class="clearer"></div>';
         }
     }
     $this->preprocess_submission($submission);
     if ($disabled) {
         echo '<div class="disabledfeedback">' . $grading_info->items[0]->grades[$userid]->str_feedback . '</div>';
     } else {
         print_textarea($this->usehtmleditor, 14, 58, 0, 0, 'submissioncomment', $submission->submissioncomment, $this->course->id);
         if ($this->usehtmleditor) {
             echo '<input type="hidden" name="format" value="' . FORMAT_HTML . '" />';
         } else {
             echo '<div class="format">';
             choose_from_menu(format_text_menu(), "format", $submission->format, "");
             helpbutton("textformat", get_string("helpformatting"));
             echo '</div>';
         }
     }
     ///Print Buttons in Single View
     echo '<div class="buttons">';
     echo '<input type="submit" name="submit" value="' . get_string('savechanges') . '" onclick = "document.getElementById(\'submitform\').menuindex.value = document.getElementById(\'submitform\').grade.selectedIndex" />';
     echo '<input type="submit" name="cancel" value="' . get_string('cancel') . '" />';
     //if there are more to be graded.
     if ($nextid) {
         echo '<input type="submit" name="saveandnext" value="' . get_string('saveandnext') . '" onclick="saveNext()" />';
         echo '<input type="submit" name="next" value="' . get_string('next') . '" onclick="setNext();" />';
     }
     echo '</div>';
     echo '</div></form>';
     $customfeedback = $this->custom_feedbackform($submission, true);
     if (!empty($customfeedback)) {
         echo $customfeedback;
     }
     echo '</td></tr>';
     ///End of teacher info row, Start of student info row
     echo '<tr>';
     echo '<td class="picture user">';
     print_user_picture($user->id, $this->course->id, $user->picture);
     echo '</td>';
     echo '<td class="topic">';
     echo '<div class="from">';
     echo '<div class="fullname">' . fullname($user, true) . '</div>';
     if ($submission->timemodified) {
         echo '<div class="time">' . userdate($submission->timemodified) . $this->display_lateness($submission->timemodified) . '</div>';
     }
     echo '</div>';
     $this->print_user_files($user->id);
     echo '</td>';
     echo '</tr>';
     ///End of student info row
     echo '</table>';
     if (!$disabled and $this->usehtmleditor) {
         use_html_editor();
     }
     print_footer('none');
 }
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:101,代码来源:lib.php


示例18: print_question_formulation_and_controls

 function print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options)
 {
     global $CFG;
     $context = $this->get_context_by_category_id($question->category);
     $answers =& $question->options->answers;
     $readonly = empty($options->readonly) ? '' : 'disabled="disabled"';
     // Only use the rich text editor for the first essay question on a page.
     $formatoptions = new stdClass();
     $formatoptions->noclean = true;
     $formatoptions->para = false;
     $inputname = $question->name_prefix;
     $stranswer = get_string("answer", "quiz") . ': ';
     /// set question text and media
     $questiontext = format_text($question->questiontext, $question->questiontextformat, $formatoptions, $cmoptions->course);
     // feedback handling
     $feedback = '';
     if ($options->feedback && !empty($answers)) {
         foreach ($answers as $answer) {
             $feedback = quiz_rewrite_question_urls($answer->feedback, 'pluginfile.php', $context->id, 'question', 'answerfeedback', array($state->attempt, $state->question), $answer->id);
             $feedback = format_text($feedback, $answer->feedbackformat, $formatoptions, $cmoptions->course);
         }
     }
     // get response value
     if (isset($state->responses[''])) {
         $value = $state->responses[''];
     } else {
         $value = '';
     }
     // answer
     if (empty($options->readonly)) {
         // the student needs to type in their answer so print out a text editor
         $answer = print_textarea(can_use_html_editor(), 18, 80, 630, 400, $inputname, $value, $cmoptions->course, true);
     } else {
         // it is read only, so just format the students answer and output it
         $safeformatoptions = new stdClass();
         $safeformatoptions->para = false;
         $answer = format_text($value, FORMAT_MOODLE, $safeformatoptions, $cmoptions->course);
         $answer = '<div class="answerreview">' . $answer . '</div>';
     }
     include "{$CFG->dirroot}/question/type/essay/display.html";
 }
开发者ID:esyacelga,项目名称:sisadmaca,代码行数:41,代码来源:questiontype.php


示例19: get_priority_name

------------------------------------------------------------------------------------------------------
%s
------------------------------------------------------------------------------------------------------
", $task["name"], $project_manager, $task["start"], $task["end"], get_priority_name($task["priority"]), $task_days, $task_cost, $task["completion"], $participants, $task["description"]);

$section_title = __("Task report details");
$section_subtitle =  $project_name . " >> " .$task["name"];
$t_menu = print_task_tabs();
print_title_with_menu ($section_title, $section_subtitle, "task_emailreport", 'projects', $t_menu, 'email');

echo "<form method=post action=''>";
echo "<table width=100% class=search-table-button>";
echo "<tr><td>";
print_input_text ('title', $title, '', 80, 175, false, __('Subject'));
echo "<tr><td>";
print_textarea ('description', 15, 50, $description, '',	false, __('Message text'));
echo "<tr><td>";
echo '</table>';

$button = '';
echo '<div style="width:100%;">';
$table = new StdClass;
$table->width = '100%';
$table->class = "button-form";
$button .= print_submit_button (__('Send'), 'create_btn', false, 'class="sub create"', true);
$button .= print_input_hidden ('operation', 'generate_email',true);
$button .= print_input_hidden ('id_project', $id_project, true);
$button .= print_input_hidden ('id_task', $id_task, true);

$table->data[7][0] = $button;
$table->colspan[7][0] = 2;
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:task_emailreport.php


示例20: get_string

    <?php 
echo "<tr><td><strong>";
echo get_string("pagecontents", "lesson") . ":</strong><br />\n";
print_textarea($usehtmleditor, 25, 70, 0, 0, "contents");
echo "</td></tr>\n";
echo "<tr><td>\n";
echo "<div class=\"boxaligncenter addform\"><input name=\"layout\" type=\"checkbox\" value=\"1\" checked=\"checked\" />";
echo get_string("arrangebuttonshorizontally", "lesson") . "\n";
echo "<br /><input name=\"display\" type=\"checkbox\" value=\"1\" checked=\"checked\" />";
echo get_string("displayinleftmenu", "lesson");
echo "</div>\n";
echo "</td></tr>\n";
for ($i = 0; $i < $lesson->maxanswers; $i++) {
    $iplus1 = $i + 1;
    echo "<tr><td><strong>" . get_string("description", "lesson&quo 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP print_textarea_row函数代码示例发布时间:2022-05-15
下一篇:
PHP print_text函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap