1 | <?php |
||||||
2 | |||||||
3 | /* For licensing terms, see /license.txt */ |
||||||
4 | |||||||
5 | require_once __DIR__.'/../inc/global.inc.php'; |
||||||
6 | |||||||
7 | api_protect_course_script(true); |
||||||
8 | |||||||
9 | Event::event_access_tool(TOOL_CHAT); |
||||||
0 ignored issues
–
show
|
|||||||
10 | |||||||
11 | $logInfo = [ |
||||||
12 | 'tool' => TOOL_CHAT, |
||||||
13 | 'action' => 'start', |
||||||
14 | 'action_details' => 'start-chat', |
||||||
15 | ]; |
||||||
16 | Event::registerLog($logInfo); |
||||||
0 ignored issues
–
show
The method
registerLog() does not exist on Event .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||||
17 | |||||||
18 | // View |
||||||
19 | $externalCSS = [ |
||||||
20 | //'jquery-emojiarea/jquery.emojiarea.css', |
||||||
21 | //'jquery-textcomplete/jquery.textcomplete.css', |
||||||
22 | //'emojione/css/emojione.min.css', |
||||||
23 | //'emojione/css/autocomplete.css', |
||||||
24 | 'highlight/styles/github.css', |
||||||
25 | ]; |
||||||
26 | |||||||
27 | foreach ($externalCSS as $css) { |
||||||
28 | $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).$css); |
||||||
29 | } |
||||||
30 | |||||||
31 | $htmlHeadXtra[] = api_get_css(api_get_path(WEB_CSS_PATH).'chat.css'); |
||||||
32 | $htmlHeadXtra[] = api_get_css(api_get_path(WEB_CSS_PATH).'markdown.css'); |
||||||
33 | |||||||
34 | $externalJS = [ |
||||||
35 | 'highlight/highlight.pack.js', |
||||||
36 | //'jquery-textcomplete/jquery.textcomplete.js', |
||||||
37 | //'emojione/js/emojione.min.js', |
||||||
38 | //'jquery-emojiarea/jquery.emojiarea.js', |
||||||
39 | ]; |
||||||
40 | |||||||
41 | foreach ($externalJS as $js) { |
||||||
42 | $htmlHeadXtra[] = api_get_js($js); |
||||||
43 | } |
||||||
44 | |||||||
45 | $iconList = []; |
||||||
46 | |||||||
47 | $view = new Template(get_lang('Chat'), false, false, false, true, false); |
||||||
48 | $view->assign('icons', $iconList); |
||||||
49 | $view->assign('emoji_strategy', CourseChatUtils::getEmojiStrategy()); |
||||||
0 ignored issues
–
show
The method
getEmojiStrategy() does not exist on CourseChatUtils .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||||
50 | //$view->assign('emoji_smile', \Emojione\Emojione::toImage(':smile:')); |
||||||
51 | $view->assign('restrict_to_coach', ('true' === api_get_setting('chat.course_chat_restrict_to_coach'))); |
||||||
52 | $view->assign('user', api_get_user_info()); |
||||||
53 | $template = $view->get_template('chat/chat.tpl'); |
||||||
54 | $content = $view->fetch($template); |
||||||
55 | |||||||
56 | $view->assign('content', $content); |
||||||
57 | $view->display_no_layout_template(); |
||||||
58 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.