Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
.
/**
* This file is responsible for displaying the survey
*
* @package mod_survey
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once("../../config.php");
require_once("lib.php");
$id = required_param('id', PARAM_INT); // Course Module ID.
if (! $cm = get_coursemodule_from_id('survey', $id)) {
throw new \moodle_exception('invalidcoursemodule');
}
$cm = cm_info::create($cm);
if (! $course = $DB->get_record("course", array("id" => $cm->course))) {
throw new \moodle_exception('coursemisconf');
}
$PAGE->set_url('/mod/survey/view.php', array('id' => $id));
require_login($course, false, $cm);
$context = context_module::instance($cm->id);
require_capability('mod/survey:participate', $context);
if (! $survey = $DB->get_record("survey", array("id" => $cm->instance))) {
throw new \moodle_exception('invalidsurveyid', 'survey');
}
$trimmedintro = trim($survey->intro);
if (empty($trimmedintro)) {
$tempo = $DB->get_field("survey", "intro", array("id" => $survey->template));
$survey->intro = get_string($tempo, "survey");
}
if (! $template = $DB->get_record("survey", array("id" => $survey->template))) {
throw new \moodle_exception('invalidtmptid', 'survey');
}
$showscales = ($template->name != 'ciqname');
// Check the survey hasn't already been filled out.
$surveyalreadydone = survey_already_done($survey->id, $USER->id);
if ($surveyalreadydone) {
// Trigger course_module_viewed event and completion.
survey_view($survey, $course, $cm, $context, 'graph');
} else {
survey_view($survey, $course, $cm, $context, 'form');
}
$strsurvey = get_string("modulename", "survey");
$PAGE->set_title($survey->name);
$PAGE->set_heading($course->fullname);
// No need to show the description if the survey is done and a graph page is to be shown.
if ($surveyalreadydone && $showscales) {
$PAGE->activityheader->set_description('');
}
$PAGE->add_body_class('limitedwidth');
echo $OUTPUT->header();
// Check to see if groups are being used in this survey.
if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used.
$currentgroup = groups_get_activity_group($cm);
} else {
$currentgroup = 0;
}
$groupingid = $cm->groupingid;
if (has_capability('mod/survey:readresponses', $context) or ($groupmode == VISIBLEGROUPS)) {
$currentgroup = 0;
}
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 '