1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-24 18:04:43 +02:00

Merge branch 'MDL-40736' of git://github.com/rwijaya/moodle

This commit is contained in:
Damyon Wiese 2013-09-10 13:48:01 +08:00
commit b10ce36806
5 changed files with 18 additions and 14 deletions

@ -27,6 +27,7 @@
$PAGE->set_title($strsurveys);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading($strsurveys);
if (! $surveys = get_all_instances_in_course("survey", $course)) {
notice(get_string('thereareno', 'moodle', $strsurveys), "../../course/view.php?id=$course->id");

@ -258,7 +258,7 @@ function survey_print_recent_activity($course, $viewfullnames, $timestart) {
return false;
}
echo $OUTPUT->heading(get_string('newsurveyresponses', 'survey').':');
echo $OUTPUT->heading(get_string('newsurveyresponses', 'survey').':', 3);
foreach ($surveys as $survey) {
$url = $CFG->wwwroot.'/mod/survey/view.php?id='.$survey->cmid;
print_recent_activity_note($survey->time, $survey, $survey->name, $url, false, $viewfullnames);
@ -503,7 +503,7 @@ function survey_print_multi($question) {
$strdefault = get_string('notyetanswered', 'survey');
$strresponses = get_string('responses', 'survey');
echo $OUTPUT->heading($question->text, 3, 'questiontext');
echo $OUTPUT->heading($question->text, 3);
echo "\n<table width=\"90%\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"surveytable\">";
$options = explode( ",", $question->options);

@ -120,6 +120,7 @@
$PAGE->set_title("$course->shortname: ".format_string($survey->name));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading($survey->name);
/// Check to see if groups are being used in this survey
if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used
@ -177,7 +178,7 @@
switch ($action) {
case "summary":
echo $OUTPUT->heading($strsummary);
echo $OUTPUT->heading($strsummary, 3);
if (survey_count_responses($survey->id, $currentgroup, $groupingid)) {
echo "<div class='reportsummary'><a href=\"report.php?action=scales&amp;id=$id\">";
@ -189,7 +190,7 @@
break;
case "scales":
echo $OUTPUT->heading($strscales);
echo $OUTPUT->heading($strscales, 3);
if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
echo $OUTPUT->notification(get_string("nobodyyet","survey"));
@ -230,16 +231,16 @@
if ($scale = $DB->get_records("survey_questions", array("multi"=>$qid))) {
$scale = array_pop($scale);
echo $OUTPUT->heading("$scale->text - $strselectedquestions");
echo $OUTPUT->heading("$scale->text - $strselectedquestions", 3);
} else {
echo $OUTPUT->heading($strselectedquestions);
echo $OUTPUT->heading($strselectedquestions, 3);
}
} else { // get all top-level questions
$questions = $DB->get_records_list("survey_questions", "id", explode(',',$survey->questions));
$questionorder = explode(",", $survey->questions);
echo $OUTPUT->heading($strallquestions);
echo $OUTPUT->heading($strallquestions, 3);
}
if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
@ -264,7 +265,7 @@
$question->text = get_string($question->text, "survey");
if ($question->multi) {
echo "<h3>$question->text:</h3>";
echo $OUTPUT->heading($question->text . ':', 4);
$subquestions = $DB->get_records_list("survey_questions", "id", explode(',', $question->multi));
$subquestionorder = explode(",", $question->multi);
@ -319,7 +320,7 @@
$answers = explode(",", get_string($question->options, "survey"));
echo $OUTPUT->heading("$strquestion: $question->text");
echo $OUTPUT->heading("$strquestion: $question->text", 3);
$strname = get_string("name", "survey");
@ -360,7 +361,7 @@
case "students":
echo $OUTPUT->heading(get_string("analysisof", "survey", get_string('participants')));
echo $OUTPUT->heading(get_string("analysisof", "survey", get_string('participants')), 3);
if (! $results = survey_get_responses($survey->id, $currentgroup, $groupingid) ) {
echo $OUTPUT->notification(get_string("nobodyyet","survey"));
@ -375,7 +376,7 @@
print_error('invaliduserid');
}
echo $OUTPUT->heading(get_string("analysisof", "survey", fullname($user)));
echo $OUTPUT->heading(get_string("analysisof", "survey", fullname($user)), 3);
if ($notes != '' and confirm_sesskey()) {
if (survey_get_analysis($survey->id, $user->id)) {
@ -472,7 +473,7 @@
break;
case "download":
echo $OUTPUT->heading($strdownload);
echo $OUTPUT->heading($strdownload, 3);
require_capability('mod/survey:download', $context);

@ -61,6 +61,7 @@
$PAGE->set_title($strsurveysaved);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading($survey->name);
if (survey_already_done($survey->id, $USER->id)) {
notice(get_string("alreadysubmitted", "survey"), $_SERVER["HTTP_REFERER"]);

@ -66,6 +66,7 @@ $completion->set_module_viewed($cm);
$PAGE->set_title(format_string($survey->name));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
echo $OUTPUT->heading($survey->name);
/// Check to see if groups are being used in this survey
if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used
@ -100,8 +101,8 @@ $completion->set_module_viewed($cm);
$numusers = survey_count_responses($survey->id, $currentgroup, $groupingid);
if ($showscales) {
echo $OUTPUT->heading(get_string("surveycompleted", "survey"));
echo $OUTPUT->heading(get_string("peoplecompleted", "survey", $numusers));
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>';