mirror of
https://github.com/moodle/moodle.git
synced 2025-05-06 16:26:08 +02:00
Merge branch 'MDL-73411-master' of git://github.com/mihailges/moodle
This commit is contained in:
commit
d90d2bc00c
@ -111,9 +111,11 @@
|
|||||||
if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used
|
if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used
|
||||||
$menuaction = $action == "student" ? "students" : $action;
|
$menuaction = $action == "student" ? "students" : $action;
|
||||||
$currentgroup = groups_get_activity_group($cm, true);
|
$currentgroup = groups_get_activity_group($cm, true);
|
||||||
groups_print_activity_menu($cm, $CFG->wwwroot . "/mod/survey/report.php?id=$cm->id&action=$menuaction&qid=$qid");
|
$groupsactivitymenu = groups_print_activity_menu($cm, new moodle_url('/mod/survey/report.php',
|
||||||
|
['id' => $cm->id, 'action' => $menuaction, 'qid' => $qid]), true);
|
||||||
} else {
|
} else {
|
||||||
$currentgroup = 0;
|
$currentgroup = 0;
|
||||||
|
$groupsactivitymenu = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = array(
|
$params = array(
|
||||||
@ -139,9 +141,6 @@
|
|||||||
|
|
||||||
$groupingid = $cm->groupingid;
|
$groupingid = $cm->groupingid;
|
||||||
|
|
||||||
echo $OUTPUT->spacer(array('height'=>30, 'width'=>30, 'br'=>true)); // should be done with CSS instead
|
|
||||||
|
|
||||||
|
|
||||||
/// Print the menu across the top
|
/// Print the menu across the top
|
||||||
|
|
||||||
$virtualscales = false;
|
$virtualscales = false;
|
||||||
@ -151,20 +150,28 @@
|
|||||||
case "summary":
|
case "summary":
|
||||||
echo $OUTPUT->heading($strsummary, 3);
|
echo $OUTPUT->heading($strsummary, 3);
|
||||||
|
|
||||||
|
if ($groupsactivitymenu) {
|
||||||
|
echo html_writer::div($groupsactivitymenu, 'mb-2');
|
||||||
|
}
|
||||||
|
|
||||||
if (survey_count_responses($survey->id, $currentgroup, $groupingid)) {
|
if (survey_count_responses($survey->id, $currentgroup, $groupingid)) {
|
||||||
echo "<div class='reportsummary'><a href=\"report.php?action=scales&id=$id\">";
|
echo "<div class='reportsummary'><a href=\"report.php?action=scales&id=$id\">";
|
||||||
survey_print_graph("id=$id&group=$currentgroup&type=overall.png");
|
survey_print_graph("id=$id&group=$currentgroup&type=overall.png");
|
||||||
echo "</a></div>";
|
echo "</a></div>";
|
||||||
} else {
|
} else {
|
||||||
echo $OUTPUT->notification(get_string("nobodyyet","survey"));
|
echo $OUTPUT->notification(get_string("nobodyyet", "survey"), 'info', false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "scales":
|
case "scales":
|
||||||
echo $OUTPUT->heading($strscales, 3);
|
echo $OUTPUT->heading($strscales, 3);
|
||||||
|
|
||||||
|
if ($groupsactivitymenu) {
|
||||||
|
echo html_writer::div($groupsactivitymenu, 'mb-2');
|
||||||
|
}
|
||||||
|
|
||||||
if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
|
if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
|
||||||
echo $OUTPUT->notification(get_string("nobodyyet","survey"));
|
echo $OUTPUT->notification(get_string("nobodyyet", "survey"), 'info', false);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -214,8 +221,12 @@
|
|||||||
echo $OUTPUT->heading($strallquestions, 3);
|
echo $OUTPUT->heading($strallquestions, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($groupsactivitymenu) {
|
||||||
|
echo html_writer::div($groupsactivitymenu, 'mb-2');
|
||||||
|
}
|
||||||
|
|
||||||
if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
|
if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
|
||||||
echo $OUTPUT->notification(get_string("nobodyyet","survey"));
|
echo $OUTPUT->notification(get_string("nobodyyet", "survey"), 'info', false);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -291,6 +302,9 @@
|
|||||||
|
|
||||||
echo $OUTPUT->heading("$strquestion: $question->text", 3);
|
echo $OUTPUT->heading("$strquestion: $question->text", 3);
|
||||||
|
|
||||||
|
if ($groupsactivitymenu) {
|
||||||
|
echo html_writer::div($groupsactivitymenu, 'mb-2');
|
||||||
|
}
|
||||||
|
|
||||||
$strname = get_string("name", "survey");
|
$strname = get_string("name", "survey");
|
||||||
$strtime = get_string("time", "survey");
|
$strtime = get_string("time", "survey");
|
||||||
@ -332,8 +346,12 @@
|
|||||||
|
|
||||||
echo $OUTPUT->heading(get_string("analysisof", "survey", get_string('participants')), 3);
|
echo $OUTPUT->heading(get_string("analysisof", "survey", get_string('participants')), 3);
|
||||||
|
|
||||||
|
if ($groupsactivitymenu) {
|
||||||
|
echo html_writer::div($groupsactivitymenu, 'mb-2');
|
||||||
|
}
|
||||||
|
|
||||||
if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
|
if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
|
||||||
echo $OUTPUT->notification(get_string("nobodyyet","survey"));
|
echo $OUTPUT->notification(get_string("nobodyyet", "survey"), 'info', false);
|
||||||
} else {
|
} else {
|
||||||
survey_print_all_responses($cm->id, $results, $course->id);
|
survey_print_all_responses($cm->id, $results, $course->id);
|
||||||
}
|
}
|
||||||
@ -347,6 +365,10 @@
|
|||||||
|
|
||||||
echo $OUTPUT->heading(get_string("analysisof", "survey", fullname($user)), 3);
|
echo $OUTPUT->heading(get_string("analysisof", "survey", fullname($user)), 3);
|
||||||
|
|
||||||
|
if ($groupsactivitymenu) {
|
||||||
|
echo html_writer::div($groupsactivitymenu, 'mb-2');
|
||||||
|
}
|
||||||
|
|
||||||
if ($notes != '' and confirm_sesskey()) {
|
if ($notes != '' and confirm_sesskey()) {
|
||||||
if (survey_get_analysis($survey->id, $user->id)) {
|
if (survey_get_analysis($survey->id, $user->id)) {
|
||||||
if (! survey_update_analysis($survey->id, $user->id, $notes)) {
|
if (! survey_update_analysis($survey->id, $user->id, $notes)) {
|
||||||
@ -453,6 +475,10 @@
|
|||||||
case "download":
|
case "download":
|
||||||
echo $OUTPUT->heading($strdownload, 3);
|
echo $OUTPUT->heading($strdownload, 3);
|
||||||
|
|
||||||
|
if ($groupsactivitymenu) {
|
||||||
|
echo html_writer::div($groupsactivitymenu, 'mb-2');
|
||||||
|
}
|
||||||
|
|
||||||
require_capability('mod/survey:download', $context);
|
require_capability('mod/survey:download', $context);
|
||||||
|
|
||||||
$numusers = survey_count_responses($survey->id, $currentgroup, $groupingid);
|
$numusers = survey_count_responses($survey->id, $currentgroup, $groupingid);
|
||||||
@ -475,7 +501,7 @@
|
|||||||
echo $OUTPUT->container_end();
|
echo $OUTPUT->container_end();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
echo html_writer::tag('p', get_string("nobodyyet", "survey"), array('class' => 'centerpara'));
|
echo $OUTPUT->notification(get_string("nobodyyet", "survey"), 'info', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
<div class="container-fluid">
|
<div class="container-fluid mb-3">
|
||||||
<div class="row justify-content-between">
|
<div class="row justify-content-between">
|
||||||
<div class="col-xs-6 float-left">
|
<div class="col-xs-6 float-left">
|
||||||
{{#urlselect}}
|
{{#urlselect}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user