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

PHP feedback_get_completeds_group_count函数代码示例

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

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



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

示例1: definition

 public function definition()
 {
     global $CFG, $DB;
     $editoroptions = feedback_get_editor_options();
     $mform =& $this->_form;
     //-------------------------------------------------------------------------------
     $mform->addElement('header', 'general', get_string('general', 'form'));
     $mform->addElement('text', 'name', get_string('name', 'feedback'), array('size' => '64'));
     $mform->setType('name', PARAM_TEXT);
     $mform->addRule('name', null, 'required', null, 'client');
     $mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
     $this->standard_intro_elements(get_string('description', 'feedback'));
     //-------------------------------------------------------------------------------
     $mform->addElement('header', 'timinghdr', get_string('availability'));
     $mform->addElement('date_time_selector', 'timeopen', get_string('feedbackopen', 'feedback'), array('optional' => true));
     $mform->addElement('date_time_selector', 'timeclose', get_string('feedbackclose', 'feedback'), array('optional' => true));
     //-------------------------------------------------------------------------------
     $mform->addElement('header', 'feedbackhdr', get_string('questionandsubmission', 'feedback'));
     $options = array();
     $options[1] = get_string('anonymous', 'feedback');
     $options[2] = get_string('non_anonymous', 'feedback');
     $mform->addElement('select', 'anonymous', get_string('anonymous_edit', 'feedback'), $options);
     // check if there is existing responses to this feedback
     if (is_numeric($this->_instance) and $this->_instance and $feedback = $DB->get_record("feedback", array("id" => $this->_instance))) {
         $completed_feedback_count = feedback_get_completeds_group_count($feedback);
     } else {
         $completed_feedback_count = false;
     }
     if ($completed_feedback_count) {
         $multiple_submit_value = $feedback->multiple_submit ? get_string('yes') : get_string('no');
         $mform->addElement('text', 'multiple_submit_static', get_string('multiplesubmit', 'feedback'), array('size' => '4', 'disabled' => 'disabled', 'value' => $multiple_submit_value));
         $mform->setType('multiple_submit_static', PARAM_RAW);
         $mform->addElement('hidden', 'multiple_submit', '');
         $mform->setType('multiple_submit', PARAM_INT);
         $mform->addHelpButton('multiple_submit_static', 'multiplesubmit', 'feedback');
     } else {
         $mform->addElement('selectyesno', 'multiple_submit', get_string('multiplesubmit', 'feedback'));
         $mform->addHelpButton('multiple_submit', 'multiplesubmit', 'feedback');
     }
     $mform->addElement('selectyesno', 'email_notification', get_string('email_notification', 'feedback'));
     $mform->addHelpButton('email_notification', 'email_notification', 'feedback');
     $mform->addElement('selectyesno', 'autonumbering', get_string('autonumbering', 'feedback'));
     $mform->addHelpButton('autonumbering', 'autonumbering', 'feedback');
     //-------------------------------------------------------------------------------
     $mform->addElement('header', 'aftersubmithdr', get_string('after_submit', 'feedback'));
     $mform->addElement('selectyesno', 'publish_stats', get_string('show_analysepage_after_submit', 'feedback'));
     $mform->addElement('editor', 'page_after_submit_editor', get_string("page_after_submit", "feedback"), null, $editoroptions);
     $mform->setType('page_after_submit_editor', PARAM_RAW);
     $mform->addElement('text', 'site_after_submit', get_string('url_for_continue', 'feedback'), array('size' => '64', 'maxlength' => '255'));
     $mform->setType('site_after_submit', PARAM_TEXT);
     $mform->addHelpButton('site_after_submit', 'url_for_continue', 'feedback');
     //-------------------------------------------------------------------------------
     $this->standard_coursemodule_elements();
     //-------------------------------------------------------------------------------
     // buttons
     $this->add_action_buttons();
 }
开发者ID:pzhu2004,项目名称:moodle,代码行数:57,代码来源:mod_form.php


示例2: require

require('tabs.php');

$previewimg = $OUTPUT->pix_icon('t/preview', get_string('preview'));
$previewlnk = '<a href="'.$CFG->wwwroot.'/mod/feedback/print.php?id='.$id.'">'.$previewimg.'</a>';

echo $OUTPUT->heading(format_text($feedback->name.' '.$previewlnk));

//show some infos to the feedback
if (has_capability('mod/feedback:edititems', $context)) {
    //get the groupid
    $groupselect = groups_print_activity_menu($cm, $CFG->wwwroot.'/mod/feedback/view.php?id='.$cm->id, true);
    $mygroupid = groups_get_activity_group($cm);

    echo $OUTPUT->box_start('boxaligncenter boxwidthwide');
    echo $groupselect.'<div class="clearer">&nbsp;</div>';
    $completedscount = feedback_get_completeds_group_count($feedback, $mygroupid);
    echo $OUTPUT->box_start('feedback_info');
    echo '<span class="feedback_info">';
    echo get_string('completed_feedbacks', 'feedback').': ';
    echo '</span>';
    echo '<span class="feedback_info_value">';
    echo $completedscount;
    echo '</span>';
    echo $OUTPUT->box_end();

    $params = array('feedback'=>$feedback->id, 'hasvalue'=>1);
    $itemscount = $DB->count_records('feedback_item', $params);
    echo $OUTPUT->box_start('feedback_info');
    echo '<span class="feedback_info">';
    echo get_string('questions', 'feedback').': ';
    echo '</span>';
开发者ID:verbazend,项目名称:AWFA,代码行数:31,代码来源:view.php


示例3: moodle_url

    //button "export to excel"
    echo $OUTPUT->container_start('mdl-align');
    $aurl = new moodle_url('analysis_to_excel.php',
                           array('sesskey' => sesskey(),
                                 'id' => $id,
                                 'coursefilter' => $coursefilter));

    echo $OUTPUT->single_button($aurl, get_string('export_to_excel', 'feedback'));
    echo $OUTPUT->container_end();
}

//get the groupid
//lstgroupid is the choosen id
$mygroupid = false;
//get completed feedbacks
$completedscount = feedback_get_completeds_group_count($feedback, $mygroupid, $coursefilter);

//show the count
echo '<b>'.get_string('completed_feedbacks', 'feedback').': '.$completedscount. '</b><br />';

// get the items of the feedback
$params = array('feedback' => $feedback->id, 'hasvalue' => 1);
$items = $DB->get_records('feedback_item', $params, 'position');
//show the count
if (is_array($items)) {
    echo '<b>'.get_string('questions', 'feedback').': ' .count($items). ' </b><hr />';
    echo '<a href="analysis_course.php?id=' . $id . '&courseid='.$courseid.'">';
    echo get_string('show_all', 'feedback');
    echo '</a>';
} else {
    $items=array();
开发者ID:JP-Git,项目名称:moodle,代码行数:31,代码来源:analysis_course.php


示例4: definition

 function definition()
 {
     global $CFG;
     $mform =& $this->_form;
     //-------------------------------------------------------------------------------
     $mform->addElement('header', 'general', get_string('general', 'form'));
     $mform->addElement('text', 'name', get_string('name', 'feedback'), array('size' => '64'));
     $mform->setType('name', PARAM_TEXT);
     $mform->addRule('name', null, 'required', null, 'client');
     $mform->addElement('htmleditor', 'summary', get_string("description", "feedback"), array('rows' => 20));
     $mform->setType('summary', PARAM_RAW);
     $mform->addRule('summary', null, 'required', null, 'client');
     //-------------------------------------------------------------------------------
     $mform->addElement('header', 'timinghdr', get_string('timing', 'form'));
     $enableopengroup = array();
     $enableopengroup[] =& $mform->createElement('checkbox', 'openenable', get_string('feedbackopen', 'feedback'));
     $enableopengroup[] =& $mform->createElement('date_time_selector', 'timeopen', '');
     $mform->addGroup($enableopengroup, 'enableopengroup', get_string('feedbackopen', 'feedback'), ' ', false);
     $mform->setHelpButton('enableopengroup', array('timeopen', get_string('feedbackopens', 'feedback'), 'feedback'));
     $mform->disabledIf('enableopengroup', 'openenable', 'notchecked');
     $enableclosegroup = array();
     $enableclosegroup[] =& $mform->createElement('checkbox', 'closeenable', get_string('feedbackclose', 'feedback'));
     $enableclosegroup[] =& $mform->createElement('date_time_selector', 'timeclose', '');
     $mform->addGroup($enableclosegroup, 'enableclosegroup', get_string('feedbackclose', 'feedback'), ' ', false);
     $mform->setHelpButton('enableclosegroup', array('timeclose', get_string('feedbackcloses', 'feedback'), 'feedback'));
     $mform->disabledIf('enableclosegroup', 'closeenable', 'notchecked');
     //-------------------------------------------------------------------------------
     $mform->addElement('header', 'feedbackhdr', get_string('feedback_options', 'feedback'));
     $options = array();
     $options[1] = get_string('anonymous', 'feedback');
     $options[2] = get_string('non_anonymous', 'feedback');
     $mform->addElement('select', 'anonymous', get_string('anonymous_edit', 'feedback'), $options);
     $mform->addElement('selectyesno', 'publish_stats', get_string('publish_stats_on_students', 'feedback'));
     $mform->addElement('selectyesno', 'email_notification', get_string('email_notification', 'feedback'));
     $mform->setHelpButton('email_notification', array('emailnotification', get_string('email_notification', 'feedback'), 'feedback'));
     // check if there is existing responses to this feedback
     if (is_numeric($this->_instance) and $this->_instance and $feedback = get_record("feedback", "id", $this->_instance)) {
         $completedFeedbackCount = feedback_get_completeds_group_count($feedback);
     } else {
         $completedFeedbackCount = false;
     }
     if ($completedFeedbackCount) {
         $multiple_submit_value = $feedback->multiple_submit ? get_string('yes') : get_string('no');
         $mform->addElement('text', 'multiple_submit_static', get_string('multiple_submit', 'feedback'), array('size' => '4', 'disabled' => 'disabled', 'value' => $multiple_submit_value));
         $mform->addElement('hidden', 'multiple_submit', '');
         $mform->setHelpButton('multiple_submit_static', array('multiplesubmit', get_string('multiple_submit', 'feedback'), 'feedback'));
     } else {
         $mform->addElement('selectyesno', 'multiple_submit', get_string('multiple_submit', 'feedback'));
         $mform->setHelpButton('multiple_submit', array('multiplesubmit', get_string('multiple_submit', 'feedback'), 'feedback'));
     }
     $mform->addElement('selectyesno', 'autonumbering', get_string('autonumbering', 'feedback'));
     $mform->setHelpButton('autonumbering', array('autonumbering', get_string('autonumbering', 'feedback'), 'feedback'));
     //-------------------------------------------------------------------------------
     $mform->addElement('header', 'aftersubmithdr', get_string('after_submit', 'feedback'));
     $mform->addElement('htmleditor', 'page_after_submit', get_string("page_after_submit", "feedback"), array('rows' => 20));
     $mform->setType('page_after_submit', PARAM_RAW);
     $mform->addElement('text', 'site_after_submit', get_string('url_for_continue_button', 'feedback'), array('size' => '64', 'maxlength' => '255'));
     $mform->setType('site_after_submit', PARAM_TEXT);
     $mform->setHelpButton('site_after_submit', array('url_for_continue', get_string('url_for_continue_button', 'feedback'), 'feedback'));
     //-------------------------------------------------------------------------------
     $features = new stdClass();
     $features->groups = true;
     $features->groupings = true;
     $features->groupmembersonly = true;
     $features->gradecat = false;
     $features->idnumber = false;
     $this->standard_coursemodule_elements($features);
     //-------------------------------------------------------------------------------
     // buttons
     $this->add_action_buttons();
 }
开发者ID:kai707,项目名称:ITSA-backup,代码行数:71,代码来源:mod_form.php


示例5: array

        $table->align = array("center", "left");
    }
} else {
    if (has_capability('mod/feedback:viewreports', $context)) {
        $table->head = array($strname, $strresponses);
        $table->align = array("left", "center");
    } else {
        $table->head = array($strname);
        $table->align = array("left");
    }
}
foreach ($feedbacks as $feedback) {
    //get the responses of each feedback
    $viewurl = new moodle_url('/mod/feedback/view.php', array('id' => $feedback->coursemodule));
    if (has_capability('mod/feedback:viewreports', $context)) {
        $completed_feedback_count = intval(feedback_get_completeds_group_count($feedback));
    }
    $dimmedclass = $feedback->visible ? '' : 'class="dimmed"';
    $link = '<a ' . $dimmedclass . ' href="' . $viewurl->out() . '">' . $feedback->name . '</a>';
    if ($usesections) {
        $tabledata = array(get_section_name($course, $feedback->section), $link);
    } else {
        $tabledata = array($link);
    }
    if (has_capability('mod/feedback:viewreports', $context)) {
        $tabledata[] = $completed_feedback_count;
    }
    $table->data[] = $tabledata;
}
echo "<br />";
echo html_writer::table($table);
开发者ID:eamador,项目名称:moodle-course-custom-fields,代码行数:31,代码来源:index.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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