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
. /** * Steps definitions related to mod_chat. * * @package mod_chat * @category test * @copyright 2021 Dongsheng Cai * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once(__DIR__ . '/../../../../lib/behat/behat_base.php'); /** * Steps definitions related to mod_chat. * */ class behat_mod_chat extends behat_base { /** * Convert page names to URLs for steps like 'When I am on the "[identifier]" "[page type]" page'. * * Recognised page names are: * | pagetype | name meaning | description | * | View | Chat name | The chat info page (view.php) | * * @param string $type identifies which type of page this is, e.g. 'View'. * @param string $name chat instance name * @return moodle_url the corresponding URL. * @throws Exception with a meaningful error message if the specified page cannot be found. */ protected function resolve_page_instance_url(string $type, string $name): moodle_url { switch (strtolower($type)) { case 'view': $cm = $this->get_cm_by_chat_name($name); return new moodle_url('/mod/chat/view.php', ['id' => $cm->id]); default: throw new Exception('Unrecognised chat page type "' . $type . '."'); } } /** * Get a chat by name. * * @param string $name chat name. * @return stdClass the corresponding DB row. */ protected function get_chat_by_name(string $name): stdClass { global $DB; return $DB->get_record('chat', ['name' => $name], '*', MUST_EXIST); } /** * Get a chat coursemodule object from the name. * * @param string $name chat name. * @return stdClass cm from get_coursemodule_from_instance. */ protected function get_cm_by_chat_name(string $name): stdClass { $chat = $this->get_chat_by_name($name); return get_coursemodule_from_instance('chat', $chat->id, $chat->course); } }