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

PHP survey_count_responses函数代码示例

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

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



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

示例1: switch

    if (has_capability('mod/survey:download', $context)) {
        echo "&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"report.php?action=download&amp;id={$id}\">{$strdownload}</a>";
    }
    if (empty($action)) {
        $action = "questions";
    }
}
echo $OUTPUT->box_end();
echo $OUTPUT->spacer(array('height' => 30, 'width' => 30, 'br' => true));
// should be done with CSS instead
/// Print the menu across the top
$virtualscales = false;
switch ($action) {
    case "summary":
        echo $OUTPUT->heading($strsummary);
        if (survey_count_responses($survey->id, $currentgroup, $groupingid)) {
            echo "<div class='reportsummary'><a href=\"report.php?action=scales&amp;id={$id}\">";
            survey_print_graph("id={$id}&amp;group={$currentgroup}&amp;type=overall.png");
            echo "</a></div>";
        } else {
            echo $OUTPUT->notification(get_string("nobodyyet", "survey"));
        }
        break;
    case "scales":
        echo $OUTPUT->heading($strscales);
        if (!($results = survey_get_responses($survey->id, $currentgroup, $groupingid))) {
            echo $OUTPUT->notification(get_string("nobodyyet", "survey"));
        } else {
            $questions = $DB->get_records_list("survey_questions", "id", explode(',', $survey->questions));
            $questionorder = explode(",", $survey->questions);
            foreach ($questionorder as $key => $val) {
开发者ID:saurabh947,项目名称:MoodleLearning,代码行数:31,代码来源:report.php


示例2: survey_count_responses

if (has_capability('mod/survey:readresponses', $context) or $groupmode == VISIBLEGROUPS) {
    $currentgroup = 0;
}
if (has_capability('mod/survey:readresponses', $context)) {
    $numusers = survey_count_responses($survey->id, $currentgroup, $groupingid);
    echo "<div class=\"reportlink\"><a href=\"report.php?id={$cm->id}\">" . get_string("viewsurveyresponses", "survey", $numusers) . "</a></div>";
} else {
    if (!$cm->visible) {
        notice(get_string("activityiscurrentlyhidden"));
    }
}
if (!is_enrolled($context)) {
    echo $OUTPUT->notification(get_string("guestsnotallowed", "survey"));
}
if ($surveyalreadydone) {
    $numusers = survey_count_responses($survey->id, $currentgroup, $groupingid);
    if ($showscales) {
        // Ensure that graph.php will allow the user to see the graph.
        if (has_capability('mod/survey:readresponses', $context) || !$groupmode || groups_is_member($currentgroup)) {
            echo $OUTPUT->box(get_string("surveycompleted", "survey"));
            echo $OUTPUT->box(get_string("peoplecompleted", "survey", $numusers));
            echo '<div class="resultgraph">';
            survey_print_graph("id={$cm->id}&amp;sid={$USER->id}&amp;group={$currentgroup}&amp;type=student.png");
            echo '</div>';
        } else {
            echo $OUTPUT->box(get_string("surveycompletednograph", "survey"));
            echo $OUTPUT->box(get_string("peoplecompleted", "survey", $numusers));
        }
    } else {
        echo $OUTPUT->box(format_module_intro('survey', $survey, $cm->id), 'generalbox', 'intro');
        echo $OUTPUT->spacer(array('height' => 30, 'width' => 1), true);
开发者ID:evltuma,项目名称:moodle,代码行数:31,代码来源:view.php


示例3: print_simple_box_end

    echo "&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"report.php?action=students&amp;id={$id}\">{$course->students}</a>";
    if (has_capability('mod/survey:download', $context)) {
        echo "&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"report.php?action=download&amp;id={$id}\">{$strdownload}</a>";
    }
    if (empty($action)) {
        $action = "questions";
    }
}
print_simple_box_end();
print_spacer(30, 30);
/// Print the menu across the top
$virtualscales = false;
switch ($action) {
    case "summary":
        print_heading($strsummary);
        if (survey_count_responses($survey->id, $currentgroup)) {
            echo "<div class='reportsummary'><a href=\"report.php?action=scales&amp;id={$id}\">";
            survey_print_graph("id={$id}&amp;group={$currentgroup}&amp;type=overall.png");
            echo "</a></div>";
        } else {
            notify(get_string("nobodyyet", "survey"));
        }
        break;
    case "scales":
        print_heading($strscales);
        if (!($results = survey_get_responses($survey->id, $currentgroup))) {
            notify(get_string("nobodyyet", "survey"));
        } else {
            $questions = get_records_list("survey_questions", "id", $survey->questions);
            $questionorder = explode(",", $survey->questions);
            foreach ($questionorder as $key => $val) {
开发者ID:veritech,项目名称:pare-project,代码行数:31,代码来源:report.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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