本文整理汇总了PHP中feedback_get_completeds_group函数的典型用法代码示例。如果您正苦于以下问题:PHP feedback_get_completeds_group函数的具体用法?PHP feedback_get_completeds_group怎么用?PHP feedback_get_completeds_group使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了feedback_get_completeds_group函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: feedback_get_completeds_group_count
/**
* get the count of completeds depending on the given groupid.
* @param object $feedback
* @param int $groupid
* @param int $courseid
* @return mixed count of completeds or false
*/
function feedback_get_completeds_group_count($feedback, $groupid = false, $courseid = false)
{
global $CFG;
if ($courseid > 0 and !$groupid <= 0) {
$sql = 'SELECT id, COUNT( item ) ci
FROM ' . $CFG->prefix . 'feedback_value
WHERE course_id = ' . $courseid . '
GROUP BY item ORDER BY ci DESC';
if ($foundrecs = get_records_sql($sql)) {
$foundrecs = array_values($foundrecs);
return $foundrecs[0]->ci;
}
return false;
}
if ($values = feedback_get_completeds_group($feedback, $groupid)) {
return sizeof($values);
} else {
return false;
}
}
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:27,代码来源:lib.php
示例2: feedback_get_completeds_group_count
/**
* get the count of completeds depending on the given groupid.
*
* @global object
* @global object
* @param object $feedback
* @param int $groupid
* @param int $courseid
* @return mixed count of completeds or false
*/
function feedback_get_completeds_group_count($feedback, $groupid = false, $courseid = false) {
global $CFG, $DB;
if ($courseid > 0 AND !$groupid <= 0) {
$sql = "SELECT id, COUNT(item) AS ci
FROM {feedback_value}
WHERE course_id = ?
GROUP BY item ORDER BY ci DESC";
if ($foundrecs = $DB->get_records_sql($sql, array($courseid))) {
$foundrecs = array_values($foundrecs);
return $foundrecs[0]->ci;
}
return false;
}
if ($values = feedback_get_completeds_group($feedback, $groupid)) {
return count($values);
} else {
return false;
}
}
开发者ID:numbas,项目名称:moodle,代码行数:30,代码来源:lib.php
示例3: array
$rowOffset1++;
if (empty($items)) {
$items = array();
}
foreach ($items as $item) {
//get the class of item-typ
$itemclass = 'feedback_item_' . $item->typ;
//get the instance of the item-class
$itemobj = new $itemclass();
$rowOffset1 = $itemobj->excelprint_item($worksheet1, $rowOffset1, $item, $mygroupid, $coursefilter);
}
////////////////////////////////////////////////////////////////////////
//print the detailed sheet
////////////////////////////////////////////////////////////////////////
//get the completeds
$completeds = feedback_get_completeds_group($feedback, $mygroupid, $coursefilter);
//important: for each completed you have to print each item, even if it is not filled out!!!
//therefor for each completed we have to iterate over all items of the feedback
//this is done by feedback_excelprint_detailed_items
$rowOffset2 = 0;
//first we print the table-header
$rowOffset2 = feedback_excelprint_detailed_head($worksheet2, $items, $rowOffset2);
if (is_array($completeds)) {
foreach ($completeds as $completed) {
$rowOffset2 = feedback_excelprint_detailed_items($worksheet2, $completed, $items, $rowOffset2);
}
}
$workbook->close();
exit;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:31,代码来源:analysis_to_excel.php
注:本文中的feedback_get_completeds_group函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论