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

PHP feedback_get_depend_candidates_for_item函数代码示例

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

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



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

示例1: build_editform

 function build_editform($item, $feedback, $cm)
 {
     global $DB, $CFG;
     require_once 'label_form.php';
     //get the lastposition number of the feedback_items
     $position = $item->position;
     $lastposition = $DB->count_records('feedback_item', array('feedback' => $feedback->id));
     if ($position == -1) {
         $i_formselect_last = $lastposition + 1;
         $i_formselect_value = $lastposition + 1;
         $item->position = $lastposition + 1;
     } else {
         $i_formselect_last = $lastposition;
         $i_formselect_value = $item->position;
     }
     //the elements for position dropdownlist
     $positionlist = array_slice(range(0, $i_formselect_last), 1, $i_formselect_last, true);
     //all items for dependitem
     $feedbackitems = feedback_get_depend_candidates_for_item($feedback, $item);
     $commonparams = array('cmid' => $cm->id, 'id' => isset($item->id) ? $item->id : NULL, 'typ' => $item->typ, 'items' => $feedbackitems, 'feedback' => $feedback->id);
     $this->context = get_context_instance(CONTEXT_MODULE, $cm->id);
     //preparing the editor for new file-api
     $item->presentationformat = FORMAT_HTML;
     $item->presentationtrust = 1;
     $item = file_prepare_standard_editor($item, 'presentation', $this->presentationoptions, $this->context, 'mod_feedback', 'item', $item->id);
     //build the form
     $this->item_form = new feedback_label_form('edit_item.php', array('item' => $item, 'common' => $commonparams, 'positionlist' => $positionlist, 'position' => $position, 'presentationoptions' => $this->presentationoptions));
 }
开发者ID:sebastiansanio,项目名称:tallerdeprogramacion2fiuba,代码行数:28,代码来源:lib.php


示例2: build_editform

 function build_editform($item, $feedback, $cm)
 {
     global $DB, $CFG;
     require_once 'numeric_form.php';
     //get the lastposition number of the feedback_items
     $position = $item->position;
     $lastposition = $DB->count_records('feedback_item', array('feedback' => $feedback->id));
     if ($position == -1) {
         $i_formselect_last = $lastposition + 1;
         $i_formselect_value = $lastposition + 1;
         $item->position = $lastposition + 1;
     } else {
         $i_formselect_last = $lastposition;
         $i_formselect_value = $item->position;
     }
     //the elements for position dropdownlist
     $positionlist = array_slice(range(0, $i_formselect_last), 1, $i_formselect_last, true);
     $item->presentation = empty($item->presentation) ? '' : $item->presentation;
     $range_from_to = explode('|', $item->presentation);
     $range_from = (isset($range_from_to[0]) and is_numeric($range_from_to[0])) ? str_replace(FEEDBACK_DECIMAL, $this->sep_dec, floatval($range_from_to[0])) : '-';
     $range_to = (isset($range_from_to[1]) and is_numeric($range_from_to[1])) ? str_replace(FEEDBACK_DECIMAL, $this->sep_dec, floatval($range_from_to[1])) : '-';
     $item->rangefrom = $range_from;
     $item->rangeto = $range_to;
     //all items for dependitem
     $feedbackitems = feedback_get_depend_candidates_for_item($feedback, $item);
     $commonparams = array('cmid' => $cm->id, 'id' => isset($item->id) ? $item->id : NULL, 'typ' => $item->typ, 'items' => $feedbackitems, 'feedback' => $feedback->id);
     //build the form
     $this->item_form = new feedback_numeric_form('edit_item.php', array('item' => $item, 'common' => $commonparams, 'positionlist' => $positionlist, 'position' => $position));
 }
开发者ID:esyacelga,项目名称:sisadmaca,代码行数:29,代码来源:lib.php


示例3: build_editform

 public function build_editform($item, $feedback, $cm)
 {
     global $DB, $CFG;
     require_once 'info_form.php';
     //get the lastposition number of the feedback_items
     $position = $item->position;
     $lastposition = $DB->count_records('feedback_item', array('feedback' => $feedback->id));
     if ($position == -1) {
         $i_formselect_last = $lastposition + 1;
         $i_formselect_value = $lastposition + 1;
         $item->position = $lastposition + 1;
     } else {
         $i_formselect_last = $lastposition;
         $i_formselect_value = $item->position;
     }
     //the elements for position dropdownlist
     $positionlist = array_slice(range(0, $i_formselect_last), 1, $i_formselect_last, true);
     $item->presentation = empty($item->presentation) ? self::MODE_COURSE : $item->presentation;
     $item->required = 0;
     //all items for dependitem
     $feedbackitems = feedback_get_depend_candidates_for_item($feedback, $item);
     $commonparams = array('cmid' => $cm->id, 'id' => isset($item->id) ? $item->id : null, 'typ' => $item->typ, 'items' => $feedbackitems, 'feedback' => $feedback->id);
     // Options for the 'presentation' select element.
     $presentationoptions = array();
     if ($feedback->anonymous == FEEDBACK_ANONYMOUS_NO || $item->presentation == self::MODE_RESPONSETIME) {
         // "Response time" is hidden anyway in case of anonymous feedback, no reason to offer this option.
         // However if it was already selected leave it in the dropdown.
         $presentationoptions[self::MODE_RESPONSETIME] = get_string('responsetime', 'feedback');
     }
     $presentationoptions[self::MODE_COURSE] = get_string('course');
     $presentationoptions[self::MODE_CATEGORY] = get_string('coursecategory');
     //build the form
     $this->item_form = new feedback_info_form('edit_item.php', array('item' => $item, 'common' => $commonparams, 'positionlist' => $positionlist, 'position' => $position, 'presentationoptions' => $presentationoptions));
 }
开发者ID:IFPBMoodle,项目名称:moodle,代码行数:34,代码来源:lib.php


示例4: build_editform

    public function build_editform($item, $feedback, $cm) {
        global $DB, $CFG;
        require_once('label_form.php');

        //get the lastposition number of the feedback_items
        $position = $item->position;
        $lastposition = $DB->count_records('feedback_item', array('feedback'=>$feedback->id));
        if ($position == -1) {
            $i_formselect_last = $lastposition + 1;
            $i_formselect_value = $lastposition + 1;
            $item->position = $lastposition + 1;
        } else {
            $i_formselect_last = $lastposition;
            $i_formselect_value = $item->position;
        }
        //the elements for position dropdownlist
        $positionlist = array_slice(range(0, $i_formselect_last), 1, $i_formselect_last, true);

        //all items for dependitem
        $feedbackitems = feedback_get_depend_candidates_for_item($feedback, $item);
        $commonparams = array('cmid'=>$cm->id,
                             'id'=>isset($item->id) ? $item->id : null,
                             'typ'=>$item->typ,
                             'items'=>$feedbackitems,
                             'feedback'=>$feedback->id);

        $this->context = context_module::instance($cm->id);

        //preparing the editor for new file-api
        $item->presentationformat = FORMAT_HTML;
        $item->presentationtrust = 1;

        // Append editor context to presentation options, giving preference to existing context.
        $this->presentationoptions = array_merge(array('context' => $this->context),
                                                 $this->presentationoptions);

        $item = file_prepare_standard_editor($item,
                                            'presentation', //name of the form element
                                            $this->presentationoptions,
                                            $this->context,
                                            'mod_feedback',
                                            'item', //the filearea
                                            $item->id);

        //build the form
        $customdata = array('item' => $item,
                            'common' => $commonparams,
                            'positionlist' => $positionlist,
                            'position' => $position,
                            'presentationoptions' => $this->presentationoptions);

        $this->item_form = new feedback_label_form('edit_item.php', $customdata);
    }
开发者ID:JP-Git,项目名称:moodle,代码行数:53,代码来源:lib.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP feedback_get_group_values函数代码示例发布时间:2022-05-15
下一篇:
PHP feedback_get_current_completed函数代码示例发布时间: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