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


PHP note_get_state_names函数代码示例

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


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

示例1: definition

 /**
  * Define the form for editing notes
  */
 public function definition()
 {
     $mform =& $this->_form;
     $mform->addElement('header', 'general', get_string('note', 'notes'));
     $mform->addElement('textarea', 'content', get_string('content', 'notes'), array('rows' => 15, 'cols' => 40));
     $mform->setType('content', PARAM_RAW);
     $mform->addRule('content', get_string('nocontent', 'notes'), 'required', null, 'client');
     $mform->addElement('select', 'publishstate', get_string('publishstate', 'notes'), note_get_state_names());
     $mform->setDefault('publishstate', NOTES_STATE_PUBLIC);
     $mform->setType('publishstate', PARAM_ALPHA);
     $mform->addHelpButton('publishstate', 'publishstate', 'notes');
     $this->add_action_buttons();
     $mform->addElement('hidden', 'courseid');
     $mform->setType('courseid', PARAM_INT);
     $mform->addElement('hidden', 'userid');
     $mform->setType('userid', PARAM_INT);
     $mform->addElement('hidden', 'id');
     $mform->setType('id', PARAM_INT);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:22,代码来源:edit_form.php

示例2: redirect

    }
    redirect("{$CFG->wwwroot}/user/index.php?id={$id}");
}
/// Print headers
$straddnote = get_string('groupaddnewnote', 'notes');
$navlinks = array();
$navlinks[] = array('name' => $straddnote, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header("{$course->shortname}: " . get_string('extendenrol'), $course->fullname, $navigation, "", "", true, " ", navmenu($course));
// this will contain all available the based On select options, but we'll disable some on them on a per user basis
print_heading($straddnote);
echo '<form method="post" action="groupaddnote.php" >';
echo '<div style="width:100%;text-align:center;">';
echo '<input type="hidden" name="id" value="' . $course->id . '" />';
echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
$state_names = note_get_state_names();
// the first time list hack
if (empty($users)) {
    foreach ($_POST as $k => $v) {
        if (preg_match('/^user(\\d+)$/', $k, $m)) {
            $users[] = $m[1];
        }
    }
}
$strpublishstate = get_string('publishstate', 'notes');
$userlist = array();
foreach ($users as $k => $v) {
    if (!($user = get_record('user', 'id', $v))) {
        continue;
    }
    echo '<input type="hidden" name="userid[' . $k . ']" value="' . $v . '" />';
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:groupaddnote.php

示例3: note_get_state_name

/**
 * Converts a state value to its corespondent name
 *
 * @param string  $state state value to convert
 * @return string corespondent state name
 */
function note_get_state_name($state)
{
    // cache state names
    static $states;
    if (empty($states)) {
        $states = note_get_state_names();
    }
    if (isset($states[$state])) {
        return $states[$state];
    } else {
        return null;
    }
}
开发者ID:EmmanuelYupit,项目名称:educursos,代码行数:19,代码来源:lib.php

示例4: note_get_state_name

/**
 * Converts a state value to its corespondent name
 *
 * @param string  $state state value to convert
 * @return string corespondent state name
 */
function note_get_state_name($state)
{
    // cache state names
    static $states;
    if (empty($states)) {
        $states = note_get_state_names();
    }
    return @$states[$state];
}
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:15,代码来源:lib.php


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