__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
require_once("../../config.php");
require_once("lib.php");
$id = required_param('id', PARAM_INT); // Course Module ID
$PAGE->set_url('/mod/survey/index.php', array('id'=>$id));
if (!$course = $DB->get_record('course', array('id'=>$id))) {
throw new \moodle_exception('invalidcourseid');
}
require_course_login($course);
$PAGE->set_pagelayout('incourse');
$params = array(
'context' => context_course::instance($course->id),
'courseid' => $course->id
);
$event = \mod_survey\event\course_module_instance_list_viewed::create($params);
$event->trigger();
$strsurveys = get_string("modulenameplural", "survey");
$strname = get_string("name");
$strstatus = get_string("status");
$strdone = get_string("done", "survey");
$strnotdone = get_string("notdone", "survey");
$PAGE->navbar->add($strsurveys);
$PAGE->set_title($strsurveys);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
if (!$PAGE->has_secondary_navigation()) {
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");
}
$usesections = course_format_uses_sections($course->format);
$table = new html_table();
if ($usesections) {
$strsectionname = get_string('sectionname', 'format_'.$course->format);
$table->head = array ($strsectionname, $strname, $strstatus);
} else {
$table->head = array ($strname, $strstatus);
}
$currentsection = '';
foreach ($surveys as $survey) {
if (isloggedin() and survey_already_done($survey->id, $USER->id)) {
$ss = $strdone;
} else {
$ss = $strnotdone;
}
$printsection = "";
if ($usesections) {
if ($survey->section !== $currentsection) {
if ($survey->section) {
$printsection = get_section_name($course, $survey->section);
}
if ($currentsection !== "") {
$table->data[] = 'hr';
}
$currentsection = $survey->section;
}
}
//Calculate the href
if (!$survey->visible) {
//Show dimmed if the mod is hidden
$tt_href = "<a class=\"dimmed\" href=\"view.php?id=$survey->coursemodule\">".format_string($survey->name,true)."</a>";
} else {
//Show normal if the mod is visible
$tt_href = "<a href=\"view.php?id=$survey->coursemodule\">".format_string($survey->name,true)."</a>";
}
if ($usesections) {
$table->data[] = array ($printsection, $tt_href, "<a href=\"view.php?id=$survey->coursemodule\">$ss</a>");
} else {
$table->data[] = array ($tt_href, "<a href=\"view.php?id=$survey->coursemodule\">$ss</a>");
}
}
echo "<br />";
echo html_writer::table($table);
echo $OUTPUT->footer();
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| amd | Folder | 0777 |
|
|
| backup | Folder | 0777 |
|
|
| classes | Folder | 0777 |
|
|
| db | Folder | 0777 |
|
|
| lang | Folder | 0777 |
|
|
| pix | Folder | 0777 |
|
|
| templates | Folder | 0777 |
|
|
| tests | Folder | 0777 |
|
|
| deprecatedlib.php | File | 1.14 KB | 0777 |
|
| download.php | File | 13.61 KB | 0777 |
|
| graph.php | File | 29.22 KB | 0777 |
|
| index.php | File | 3.03 KB | 0777 |
|
| lib.php | File | 38.58 KB | 0777 |
|
| mod_form.php | File | 3.32 KB | 0777 |
|
| renderer.php | File | 1.41 KB | 0777 |
|
| report.php | File | 20.4 KB | 0777 |
|
| save.php | File | 2.47 KB | 0777 |
|
| styles.css | File | 786 B | 0777 |
|
| version.php | File | 1.18 KB | 0777 |
|
| view.php | File | 6.13 KB | 0777 |
|