Expanding the school learning portal on Moodle and BigBlueButton

At the end of March 2020, a small Kamchatka school faced the same problem as all schools in our country: how to teach children if they cannot go to school?

You simply cannot throw off material for independent study, there must be feedback, you need to make sure that the student correctly understood the material.

A study of federal portals made it clear that the lessons available are too primitive for topics, and those that allow you to upload your material are unlikely to survive the increased load. Therefore, the requirements for the training portal were formulated:

  1. Solution on their servers (self-hosted). Refusal from public services, which most likely will not cope with the load (which was later confirmed).
  2. Manual registration. The student should receive a login / password from the class teacher, and not go to resources and register independently.
  3. Work in a browser on all devices without the need to install third-party software. Since both parents and children are sitting at home, and there aren’t enough computers for everyone, the training portal should run on any devices (computers, tablets, smartphones) that are currently available to the student. Installing additional software can be a problem, so everything should work in a browser without additional plugins (Flash, etc.).
  4. Structuring of the lesson materials, the presence of feedback on each completed assignment. The work performed by the student should lie in the same place as the task. The teacher should not sort the homework. The teacher should be able to note student mistakes right at his work and leave comments there.
  5. Monitoring student activity. The teacher needs to know when a particular student came in and what he was doing.
  6. End-to-end authorization in video tutorials. Pupils should not be given the opportunity to introduce themselves in the video lessons, and the teacher should have all the tools for moderating the video lesson (turn on / off the microphones and cameras of each participant, prohibit private chats, turn on / off the general chat).

After a quick search and testing, we chose a bunch of Moodle + BigBlueButton as satisfying all these requirements at the same time.

Installation and configuration took 1 day off, teacher training and organizational issues - a week of vacation.

To begin with, we bought a domain (I will use the fictitious myportal.ru everywhere), delegated it to DNS servers and started the installation.

Install Moodle
Moodle «» Ubuntu 18.04 8 vCPU, 24 2 . SSH-.

.
sudo root:

$ sudo su -

:

apt update
apt dist-upgrade

timezone:

dpkg-reconfigure tzdata

:

apt-cache search cloud-init
bash -c "echo 'datasource_list: [ None ]' sudo -s tee /etc/cloud/cloud.cfg.d/90_dpkg.cfg"
apt purge -y cloud-init
rm -Rf /etc/cloud /var/lib/cloud

apache, mysql php:

apt install apache2 mysql-client mysql-server php libapache2-mod-php mc

mysql:

mysql_secure_installation

, Moodle:

apt install graphviz aspell ghostscript clamav php7.2-pspell php7.2-curl php7.2-gd php7.2-intl php7.2-mysql php7.2-xml php7.2-xmlrpc php7.2-ldap php7.2-zip php7.2-soap php7.2-mbstring

/etc/php/7.2/cli/php.ini /etc/php/7.2/apache/php.ini (, ):

[Date]
date.timezone = "Asia/Kamchatka"

Moodle /var/www/html/moodle:

wget https://download.moodle.org/download.php/stable38/moodle-latest-38.tgz

/var/www/html/moodle 0777, 0755:

chmod 0777 -R /var/www/html/moodle

/var/www/moodledata, Moodle . /var/www/moodledata 0777:

mkdir /var/www/moodledata
chmod 0777 -R /var/www/moodledata

- /etc/apache2/sites-available/ (, urok.myportal.ru.conf) :

<VirtualHost *:80>
ServerName urok.myportal.ru
ServerAdmin help@myportal.ru
DocumentRoot /var/www/html/moodle/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

apache2 :

service apache2 restart
add-apt-repository ppa:certbot/certbot
apt update
apt install certbot python3-certbot-apache
certbot --apache -d urok.myportal.ru
service apache2 restart

https, apache2 ( https):

<VirtualHost *:80>
ServerName urok.myportal.ru
ServerAdmin help@myportal.ru
DocumentRoot /var/www/html/moodle/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =urok.myportal.ru
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName urok.myportal.ru
ServerAdmin help@myportal.ru
DocumentRoot /var/www/html/moodle/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/urok.myportal.ru/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/urok.myportal.ru/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf

ufw:

ufw enable
ufw allow ssh
ufw allow 'Apache Full'
ufw delete allow 'Apache'
ufw status
Status: active
To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere
Apache Full                ALLOW       Anywhere
22/tcp (v6)                ALLOW       Anywhere (v6)
Apache Full (v6)           ALLOW       Anywhere (v6)

, 'pass' :

mysql -u root -p
CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodleuser'@'localhost' IDENTIFIED BY 'pass';

Moodle. (moodle), (moodleuser) , .

cron.php :

crontab -u www-data -e
* * * * * /usr/bin/php  /var/www/html/moodle/admin/cli/cron.php >/dev/null

Moodle, Memcached:
apt install memcached libmemcached-tools php-memcached

C ( — — ):
— Opcache management https://moodle.org/plugins/tool_opcache
— Atto: Styles https://moodle.org/plugins/atto_styles
— BigBlueButtonBN https://moodle.org/plugins/mod_bigbluebuttonbn
— Moove https://moodle.org/plugins/theme_moove
moodle:

chmod 0755 -R /var/www/html/moodle

: - www-data, /var/www/html/moodle. , Moodle /var/www/moodledata.

:

cd /var/www/html/moodle/
chmod -R 0757 mod/
chmod -R 0757 theme/

moodle :

chmod -R 0755 mod/
chmod -R 0755 theme/

Moodle , BigBlueButton.

The Moove theme is chosen as the simplest from the point of view of the user. On the main page of the user there is a large window asking to enter a username and password, and after the login - a list of lessons. It is impossible to get lost.







Of course, I would like instead of subjects to have a list of lessons for today (a more familiar format for school), but since the teachers started working with the portal on the second day after installation, we decided not to touch anything else and not change navigation.

Install BigBlueButton
BBB Freeswitch BBB . Dell R610 2 Xeon X5650, BBB.

Ubuntu 16.04.
:

apt update
apt dist-upgrade
dpkg-reconfigure tzdata

ufw , BBB:

ufw enable
ufw allow ssh
ufw allow in 80,443,1935,7443/tcp
ufw allow in 16384:32768/udp

/var/bigbluebutton/, .
LUN 4 .

:

cat /etc/default/locale

en_US.UTF-8, :

apt-get install language-pack-en
update-locale LANG=en_US.UTF-8
exit

, en_US.UTF-8:

# cat /etc/default/locale
LANG=en_US.UTF-8

show-environment. en_US.UTF-8, :

systemctl show-environment
systemctl set-environment LANG=en_US.UTF-8
systemctl show-environment
LANG=en_US.UTF-8

BBB https://github.com/bigbluebutton/bbb-install

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -s bbb.myportal.ru -e help@myportal.ru

bbb.myportal.ru help@myportal.ru . , Let's Encrypt, https.

:

apt-get purge bbb-demo

Moodle BigBlueButton API. API:

# bbb-conf --secret
    URL: https://bbb.myportal.ru/bigbluebutton/
    Secret: cBjkdnjasuibnjnfdksagn6967sfrs

URL Moodle BigBlueButtonBN.

Installing a mail server.
Moodle . , .



pdd.yandex.ru, 3000 . pdd.yandex.ru Zimbra.
Ubuntu 18.04 (4vCPU 16 1000 ) Zimbra Open Source Edition: https://www.zimbra.com/downloads/zimbra-collaboration-open-source/

hosts ip :

mcedit /etc/hosts
127.0.0.1 localhost
77.88.99.11 mail.myportal.ru mail

:

apt-cache search cloud-init
bash -c "echo 'datasource_list: [ None ]' sudo -s tee /etc/cloud/cloud.cfg.d/90_dpkg.cfg"
apt purge -y cloud-init
rm -Rf /etc/cloud /var/lib/cloud
systemctl disable systemd-resolved
systemctl stop systemd-resolved
echo "nameserver 77.88.8.8" > /etc/resolv.conf

Zimbra

wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220.tgz
tar -xzf zcs-8.8*
cd /home/zcs-8.8.15_GA_3869.UBUNTU18_64.20190918004220/
./install.sh

C .

, zimbra-drive, zimbra-chat zimbra-imapd
. myportal.ru

DNS ERROR resolving MX for mail.myportal.ru
Change domain name? Yes
myportal.ru

7 — 4 — — r — a.
ufw , Zimbra:

ufw enable
ufw allow ssh
ufw allow in 25,80,110,143,443,465,587,993,995,5222,5223,9071,7071/tcp

Zimbra mail.myportal.ru:7071
Let's Encrypt : https://github.com/VojtechMyslivec/letsencrypt-zimbra

apt install software-properties-common
add-apt-repository ppa:certbot/certbot
apt update
apt install certbot
git clone https://github.com/VojtechMyslivec/letsencrypt-zimbra.git /opt/letsencrypt-zimbra
cp /opt/letsencrypt-zimbra/letsencrypt-zimbra.cfg{.example,}

:

mcedit /opt/letsencrypt-zimbra/letsencrypt-zimbra.cfg
email="help@myportal.ru"
common_names=( "mail.myportal.ru" )

zimbra certbot:

cp configs/sudoers.conf /etc/sudoers.d/zimbra_certbot

:

sudo -Hiu zimbra /opt/letsencrypt-zimbra/obtain-and-deploy-letsencrypt-cert.sh -v

:

cp configs/cron.conf /etc/cron.d/letsencrypt-zimbra


Since there are many students, we create boxes using a script. Using the gluing of column values, the user creation rows are unloaded from the Excel table and copied to the script.

touch account.sh
chmod +x account.sh

The script has the form:

export LC_ALL='ru_RU.UTF-8'
zmprov createAccount a9arkhipov@myportal.ru 'dhfekjcjd' displayName ' ' givenName '' sn '' zimbraPasswordMustChange FALSE

The script is run as zimbra.

su zimbra
./account.sh

Configure BigBlueButton
, BBB - :

wget https://files.freeswitch.org/releases/sounds/freeswitch-sounds-ru-RU-elena-8000-1.0.51.tar.gz
wget https://files.freeswitch.org/releases/sounds/freeswitch-sounds-ru-RU-elena-16000-1.0.51.tar.gz
wget https://files.freeswitch.org/releases/sounds/freeswitch-sounds-ru-RU-elena-32000-1.0.51.tar.gz
wget https://files.freeswitch.org/releases/sounds/freeswitch-sounds-ru-RU-elena-48000-1.0.51.tar.gz

/opt/freeswitch/share/freeswitch/sounds.

, freeswitch:

chown -R freeswitch:daemon /opt/freeswitch/share/freeswitch/sounds/ru/

vars.xml:

mcedit /opt/freeswitch/etc/freeswitch/vars.xml

<X-PRE-PROCESS cmd="set" data="sound_prefix=$${sounds_dir}/ru/RU/elena"/>
, - : /var/www/bigbluebutton-default/default.pdf

:

mcedit /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties

:

, :

defaultWelcomeMessage=Welcome to <b>%%CONFNAME%%</b>!
defaultWelcomeMessageFooter=support@myportal.ru

muteOnStart=true #      .
allowModsToUnmuteUsers=true #      
attendeesJoinViaHTML5Client=true #  HTML5   Flash
moderatorsJoinViaHTML5Client=true #  HTML5   Flash
breakoutRoomsEnabled=false #   
breakoutRoomsRecord=false
breakoutRoomsPrivateChatEnabled=false
allowDuplicateExtUserid=true #        

«»



# Default Lock Settings
lockSettingsDisableCam=true
lockSettingsDisableMic=false
lockSettingsDisablePrivateChat=true
lockSettingsDisablePublicChat=false
lockSettingsDisableNote=true
lockSettingsHideUserList=false
lockSettingsLockedLayout=false
lockSettingsLockOnJoin=true
lockSettingsLockOnJoinConfigurable=true

:

mcedit /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml

- hd , :

cameraProfiles:
    - id: low
      name: Low quality 100 kbps
      default: false
      bitrate: 100
    - id: medium
      name: Medium quality 200 kbps
      default: false
      bitrate: 200
    - id: high
      name: High quality 500 kbps
      default: true
      bitrate: 500
    - id: hd

., « »:

minBrowserVersions:
  - browser: YandexBrowser
    version: 15

:

bbb-conf --stop
bbb-conf --start


Moodle customization
: — — . , , .

— . , .

Opcache management , .

/ .

: mail.myportal.ru, TLS, LOGIN, noreply@myportal.ru, , . — myportal.ru, , — .

— « » «5».
Moove ( — Moove) SCSS ATTO:

.attostylesbox {
    padding: 10px;
    box-sizing: border-box;
    border-radius: 5px;
    margin-bottom: 10px;
    width: 100%
}
.attostylesbox.attostylesbox-solid {
    color: white;
}
.attostylesbox.attostylesbox-outline {
    background-color: white;
    border-width: 2px;
    border-style: solid;
}
.attostylesbox.attostylesbox-callout {
    background-color: white;
    border: 1px solid #eee;
    border-left-width: 5px;
}
.attostylesbox.attostylesbox-solid-blue {
    background-color: #7d9fd3;
}
.attostylesbox.attostylesbox-solid-green {
    background-color: #98ca3e;
}
.attostylesbox.attostylesbox-solid-yellow {
    background-color: #ffcf35;
}
.attostylesbox.attostylesbox-solid-red {
    background-color: #ef4540;
}
.attostylesbox.attostylesbox-solid-black {
    background-color: #3a3a3a;
}
.attostylesbox.attostylesbox-outline-blue {
    border-color: #7d9fd3;
    color: #7d9fd3;
}
.attostylesbox.attostylesbox-outline-green {
    border-color: #98ca3e;
    color: #98ca3e;
}
.attostylesbox.attostylesbox-outline-yellow {
    border-color: #ffcf35;
    color: #ffcf35;
}
.attostylesbox.attostylesbox-outline-red {
    border-color: #ef4540;
    color: #ef4540;
}
.attostylesbox.attostylesbox-outline-black {
    border-color: #3a3a3a;
    color: #3a3a3a;
}
.attostylesbox.attostylesbox-callout-blue {
    border-left-color: #7d9fd3;
}
.attostylesbox.attostylesbox-callout-green {
    border-left-color: #98ca3e;
}
.attostylesbox.attostylesbox-callout-yellow {
    border-left-color: #ffcf35;
}
.attostylesbox.attostylesbox-callout-red {
    border-left-color: #ef4540;
}
.attostylesbox.attostylesbox-callout-black {
    border-left-color: #3a3a3a;
}
.attostylestextmarker {
    border-radius: 5px;
    padding-left: 5px;
    padding-right: 5px;
}
.attostylestextmarker.attostylestextmarker-green {
    background: #99ffcc;
}
.attostylestextmarker.attostylestextmarker-pink {
    background: #ffccff;
}
.attostylestextmarker.attostylestextmarker-yellow {
    background: #ffffcc;
}


, .

( — — ) BigBlueButton URL BigBlueButton , bbb-conf --secret.

( — — — ) , , ( ).

Creating Moodle Users.

Again, we take the nameplate, first name, class, generate passwords for all (for example, using ViPNet Password Generator) and generate logins and email addresses. In order not to be excruciatingly painful when using passwords in csv and scripts, we remove from the passwords those that contain 'and;



Save in csv in this format:

username:firstname:lastname:email:cohort1:city:country:lang:password
g1petrov:::g1petrov@myportal.ru:1  (2020)::RU:ru:drkcwf,f,

The file encoding should be UTF-8, convert conveniently to notepad ++.

Open Administration - Users - Download Users. Separator ":" Preview lines "1000". We look at the presence of errors and if all is well - download.

Now we have all the students. It remains to create teachers and you can create lessons.

Open Administration - Courses - Manage courses and categories. Create a category. For example, "School number 1". We assign

categories to the roles:



In Managers, we add teachers and directors, and in the creators of the course for all teachers.
We create a course (for example, 11 A Informatics). While in the course, the teacher or head teacher clicks "Participants" - "Register users to the course."



You can select a group (for example, “11 A (2020)”) to record all users from the class.
To add elements to the lesson, enable editing mode and add an element.



For example, the BigBlueButton conference. To start the conference, click "Connect to the session." The video tutorial has begun.



Over a month, experience in video tutorials has been accumulated.

  1. It’s best to use inexpensive USB desktop microphones such as the Fifine K669 or DEXP U700 for online learning. The fewer buttons on the microphone, the better.
  2. High school teachers almost stopped using webcams by the middle of the month, as the main thing was presentation and voice. The video distracts students and prevents the teacher from waking up at 8:10 and immediately starting the lesson.
  3. In the 30 minutes of an online lesson, teachers tell much more than most students have time to learn on their own in the same time.

From other schools there were requests “I want the same as Zoom to the link”, so a separate server was raised with BigBlueButton and Greenlight as a control panel.

It is set in the same way as the BBB, only with the -g switch at the end:

wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-22 -s vks.myportal.ru -e help@myportal.ru -g
cd greenlight/
docker exec greenlight-v2 bundle exec rake admin:create

There is protection against disruption of lessons (a phenomenon called zoom bombing): when creating a conference, you can enable the mode “Approval of the moderator before connection” is required. Each time a student enters, a teacher’s confirmation will be required, the teacher will only let his students in by a familiar surname.



For individual consultations, a Jitsi server was deployed, which allows you to quickly create a room and share a link, but they do not use it so much preferring to create BigBlueButton conferences for each student on the main portal.

I hope our experience is useful to someone and we made the world a little better.

All Articles