Completed
Push — master ( 956655...5a0e55 )
by Jesus
02:40
created

lib.php ➔ bigbluebuttonbn_add_instance()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 1
dl 0
loc 16
rs 9.4285
c 0
b 0
f 0
1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
17
/**
18
 * Library calls for Moodle and BigBlueButton.
19
 *
20
 * @author    Fred Dixon  (ffdixon [at] blindsidenetworks [dt] com)
21
 * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
22
 * @copyright 2010-2017 Blindside Networks Inc
23
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later
24
 */
25
26
defined('MOODLE_INTERNAL') || die;
27
28
global $CFG;
29
30
require_once($CFG->dirroot.'/calendar/lib.php');
31
require_once($CFG->dirroot.'/message/lib.php');
32
require_once($CFG->dirroot.'/mod/lti/OAuth.php');
33
require_once($CFG->libdir.'/accesslib.php');
34
require_once($CFG->libdir.'/completionlib.php');
35
require_once($CFG->libdir.'/datalib.php');
36
require_once($CFG->libdir.'/coursecatlib.php');
37
require_once($CFG->libdir.'/enrollib.php');
38
require_once($CFG->libdir.'/filelib.php');
39
require_once($CFG->libdir.'/formslib.php');
40
41
if (file_exists(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php')) {
42
    require_once(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php');
43
}
44
45
if (!isset($CFG->bigbluebuttonbn)) {
46
    $CFG->bigbluebuttonbn = array();
47
}
48
49
if (file_exists(dirname(__FILE__).'/config.php')) {
50
    require_once(dirname(__FILE__).'/config.php');
51
    // Old BigBlueButtonBN cfg schema. For backward compatibility.
52
    global $BIGBLUEBUTTONBN_CFG;
53
54
    if (isset($BIGBLUEBUTTONBN_CFG)) {
55
        foreach ((array) $BIGBLUEBUTTONBN_CFG as $key => $value) {
56
            $cfgkey = str_replace("bigbluebuttonbn_", "", $key);
57
            $CFG->bigbluebuttonbn[$cfgkey] = $value;
58
        }
59
    }
60
}
61
62
/*
63
 * DURATIONCOMPENSATION: Feature removed by configuration
64
 */
65
$CFG->bigbluebuttonbn['scheduled_duration_enabled'] = 0;
66
/*
67
 * Remove this block when restored
68
 */
69
70
const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/';
71
const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6';
72
73
const BIGBLUEBUTTONBN_LOG_EVENT_CREATE = 'Create';
74
const BIGBLUEBUTTONBN_LOG_EVENT_JOIN = 'Join';
75
const BIGBLUEBUTTONBN_LOG_EVENT_LOGOUT = 'Logout';
76
const BIGBLUEBUTTONBN_LOG_EVENT_IMPORT = 'Import';
77
const BIGBLUEBUTTONBN_LOG_EVENT_DELETE = 'Delete';
78
79
function bigbluebuttonbn_supports($feature) {
80
81
    if (!$feature) {
82
        return null;
83
    }
84
85
    $features = array(
86
        (string) FEATURE_IDNUMBER => true,
87
        (string) FEATURE_GROUPS => true,
88
        (string) FEATURE_GROUPINGS => true,
89
        (string) FEATURE_GROUPMEMBERSONLY => true,
90
        (string) FEATURE_MOD_INTRO => true,
91
        (string) FEATURE_BACKUP_MOODLE2 => true,
92
        (string) FEATURE_COMPLETION_TRACKS_VIEWS => true,
93
        (string) FEATURE_GRADE_HAS_GRADE => false,
94
        (string) FEATURE_GRADE_OUTCOMES => false,
95
        (string) FEATURE_SHOW_DESCRIPTION => true,
96
    );
97
98
    if (isset($features[(string) $feature])) {
99
        return $features[$feature];
100
    }
101
102
    return null;
103
}
104
105
/**
106
 * Given an object containing all the necessary data,
107
 * (defined by the form in mod_form.php) this function
108
 * will create a new instance and return the id number
109
 * of the new instance.
110
 *
111
 * @param object $data  An object from the form in mod_form.php
112
 * @return int The id of the newly inserted bigbluebuttonbn record
113
 */
114
function bigbluebuttonbn_add_instance($data) {
115
    global $DB;
116
    // Excecute preprocess.
117
    bigbluebuttonbn_process_pre_save($data);
118
    // Pre-set initial values.
119
    $data->presentation = bigbluebuttonbn_get_media_file($data);
120
    // Insert a record.
121
    $data->id = $DB->insert_record('bigbluebuttonbn', $data);
122
    // Encode meetingid.
123
    $meetingid = bigbluebuttonbn_encode_meetingid($data->id);
124
    // Set the meetingid column in the bigbluebuttonbn table.
125
    $DB->set_field('bigbluebuttonbn', 'meetingid', $meetingid, array('id' => $data->id));
126
    // Complete the process.
127
    bigbluebuttonbn_process_post_save($data);
128
    return $data->id;
129
}
130
131
/**
132
 * Given an object containing all the necessary data,
133
 * (defined by the form in mod_form.php) this function
134
 * will update an existing instance with new data.
135
 *
136
 * @param object $data  An object from the form in mod_form.php
137
 * @return bool Success/Fail
138
 */
139
function bigbluebuttonbn_update_instance($data) {
140
    global $DB;
141
    // Excecute preprocess.
142
    bigbluebuttonbn_process_pre_save($data);
143
    // Pre-set initial values.
144
    $data->id = $data->instance;
145
    $data->presentation = bigbluebuttonbn_get_media_file($data);
146
    // Update a record.
147
    $DB->update_record('bigbluebuttonbn', $data);
148
    // Complete the process.
149
    bigbluebuttonbn_process_post_save($data);
150
    return true;
151
}
152
153
/**
154
 * Given an ID of an instance of this module,
155
 * this function will permanently delete the instance
156
 * and any data that depends on it.
157
 *
158
 * @param int $id Id of the module instance
159
 *
160
 * @return bool Success/Failure
161
 */
162
function bigbluebuttonbn_delete_instance($id) {
163
    global $DB;
164
    $bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $id));
165
    if (!$bigbluebuttonbn) {
166
        return false;
167
    }
168
    // TODO: End the meeting if it is running.
169
170
    // Perform delete.
171
    if (!$DB->delete_records('bigbluebuttonbn', array('id' => $bigbluebuttonbn->id))) {
172
        return false;
173
    }
174
    if (!$DB->delete_records('event', array('modulename' => 'bigbluebuttonbn', 'instance' => $bigbluebuttonbn->id))) {
175
        return false;
176
    }
177
    // Log action performed.
178
    return bigbluebuttonbn_delete_instance_log($bigbluebuttonbn);
179
}
180
181
function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
182
    global $DB, $USER;
183
    $log = new stdClass();
184
    $log->meetingid = $bigbluebuttonbn->meetingid;
185
    $log->courseid = $bigbluebuttonbn->course;
186
    $log->bigbluebuttonbnid = $bigbluebuttonbn->id;
187
    $log->userid = $USER->id;
188
    $log->timecreated = time();
189
    $log->log = BIGBLUEBUTTONBN_LOG_EVENT_DELETE;
190
    $sql = "SELECT * FROM {bigbluebuttonbn_logs} WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?";
191
    $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
192
    $log->meta = "{\"has_recordings\":false}";
193
    if (!empty($logs)) {
194
        $log->meta = "{\"has_recordings\":true}";
195
    }
196
    if (!$DB->insert_record('bigbluebuttonbn_logs', $log)) {
197
        return false;
198
    }
199
    return true;
200
}
201
/**
202
 * Return a small object with summary information about what a
203
 * user has done with a given particular instance of this module
204
 * Used for user activity reports.
205
 * $return->time = the time they did it
206
 * $return->info = a short text description.
207
 *
208
 * @return bool
209
 */
210
function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
0 ignored issues
show
Unused Code introduced by
The parameter $mod is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
211
    global $DB;
212
    $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id,
213
                                                              'bigbluebuttonbnid' => $bigbluebuttonbn->id,
214
                                                              'userid' => $user->id,
215
                                                              'log' => 'Join', ), '*');
216
    if ($completed > 0) {
217
        return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '.
218
            get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '.
219
            get_string('view_message_times', 'bigbluebuttonbn');
220
    }
221
    return '';
222
}
223
224
/**
225
 * Print a detailed representation of what a user has done with
226
 * a given particular instance of this module, for user activity reports.
227
 *
228
 * @return bool
229
 */
230
function bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn) {
0 ignored issues
show
Unused Code introduced by
The parameter $mod is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
231
    global $DB;
232
    $completed = $DB->count_recorda('bigbluebuttonbn_logs', array('courseid' => $course->id,
233
                                                              'bigbluebuttonbnid' => $bigbluebuttonbn->id,
234
                                                              'userid' => $user->id,
235
                                                              'log' => 'Join', ), '*', IGNORE_MULTIPLE);
236
    return $completed > 0;
237
}
238
239
/**
240
 * Returns all other caps used in module.
241
 *
242
 * @return string[]
243
 */
244
function bigbluebuttonbn_get_extra_capabilities() {
245
    return array('moodle/site:accessallgroups');
246
}
247
248
/**
249
 * List of view style log actions.
250
 *
251
 * @return string[]
252
 */
253
function bigbluebuttonbn_get_view_actions() {
254
    return array('view', 'view all');
255
}
256
257
/**
258
 * List of update style log actions.
259
 *
260
 * @return string[]
261
 */
262
function bigbluebuttonbn_get_post_actions() {
263
    return array('update', 'add', 'create', 'join', 'end', 'left', 'publish', 'unpublish', 'delete');
264
}
265
266
/**
267
 * @param array $courses
268
 * @param array $htmlarray Passed by reference
269
 */
270
function bigbluebuttonbn_print_overview($courses, &$htmlarray) {
271
    if (empty($courses) || !is_array($courses)) {
272
        return array();
273
    }
274
    $bns = get_all_instances_in_courses('bigbluebuttonbn', $courses);
275
    foreach ($bns as $bn) {
276
        $now = time();
277
        if ($bn->openingtime and (!$bn->closingtime or $bn->closingtime > $now)) {
278
            // A bigbluebuttonbn is scheduled.
279
            if (empty($htmlarray[$bn->course]['bigbluebuttonbn'])) {
280
                $htmlarray[$bn->course]['bigbluebuttonbn'] = '';
281
            }
282
            $htmlarray[$bn->course]['bigbluebuttonbn'] = bigbluebuttonbn_print_overview_element($bn, $now);
283
        }
284
    }
285
}
286
287
/**
288
 * @global object
289
 *
290
 * @param array $bigbluebuttonbn
291
 * @param int $now
292
 */
293
function bigbluebuttonbn_print_overview_element($bigbluebuttonbn, $now) {
294
    global $CFG;
295
    $start = 'started_at';
296
    if ($bigbluebuttonbn->openingtime > $now) {
297
        $start = 'starts_at';
298
    }
299
    $classes = '';
300
    if ($bigbluebuttonbn->visible) {
301
        $classes = 'class="dimmed" ';
302
    }
303
    $str  = '<div class="bigbluebuttonbn overview">'."\n";
304
    $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
305
    $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
306
      '">'.$bigbluebuttonbn->name.'</a>'."\n";
307
    $str .= '  </div>'."\n";
308
    $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
309
        '</div>'."\n";
310
    $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
311
      .'</div>'."\n";
312
    $str .= '</div>'."\n";
313
    return $str;
314
}
315
316
/**
317
 * Given a course_module object, this function returns any
318
 * "extra" information that may be needed when printing
319
 * this activity in a course listing.
320
 * See get_array_of_activities() in course/lib.php.
321
 *
322
 * @global object
323
 *
324
 * @param object $coursemodule
325
 *
326
 * @return null|cached_cm_info
327
 */
328
function bigbluebuttonbn_get_coursemodule_info($coursemodule) {
329
    global $DB;
330
    $bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $coursemodule->instance),
331
        'id, name, intro, introformat');
332
    if (!$bigbluebuttonbn) {
333
        return null;
334
    }
335
    $info = new cached_cm_info();
336
    $info->name = $bigbluebuttonbn->name;
337
    if ($coursemodule->showdescription) {
338
        // Convert intro to html. Do not filter cached version, filters run at display time.
339
        $info->content = format_module_intro('bigbluebuttonbn', $bigbluebuttonbn, $coursemodule->id, false);
340
    }
341
    return $info;
342
}
343
344
/**
345
 * Runs any processes that must run before a bigbluebuttonbn insert/update.
346
 *
347
 * @global object
348
 *
349
 * @param object $bigbluebuttonbn BigBlueButtonBN form data
350
 **/
351
function bigbluebuttonbn_process_pre_save(&$bigbluebuttonbn) {
352
    $bigbluebuttonbn->timemodified = time();
353
    if (!isset($bigbluebuttonbn->timecreated) || !$bigbluebuttonbn->timecreated) {
354
        $bigbluebuttonbn->timecreated = time();
355
        $bigbluebuttonbn->timemodified = 0;
356
        // As it is a new activity, assign passwords.
357
        $bigbluebuttonbn->moderatorpass = bigbluebuttonbn_random_password(12);
358
        $bigbluebuttonbn->viewerpass = bigbluebuttonbn_random_password(12);
359
    }
360
    if (!isset($bigbluebuttonbn->wait)) {
361
        $bigbluebuttonbn->wait = 0;
362
    }
363
    if (!isset($bigbluebuttonbn->record)) {
364
        $bigbluebuttonbn->record = 0;
365
    }
366
    if (!isset($bigbluebuttonbn->recordings_html)) {
367
        $bigbluebuttonbn->recordings_html = 0;
368
    }
369
    if (!isset($bigbluebuttonbn->recordings_deleted)) {
370
        $bigbluebuttonbn->recordings_deleted = 0;
371
    }
372
    if (!isset($bigbluebuttonbn->recordings_imported)) {
373
        $bigbluebuttonbn->recordings_imported = 0;
374
    }
375
    $bigbluebuttonbn->participants = htmlspecialchars_decode($bigbluebuttonbn->participants);
376
}
377
378
/**
379
 * Runs any processes that must be run after a bigbluebuttonbn insert/update.
380
 *
381
 * @global object
382
 *
383
 * @param object $bigbluebuttonbn BigBlueButtonBN form data
384
 **/
385
function bigbluebuttonbn_process_post_save(&$bigbluebuttonbn) {
386
    if (isset($bigbluebuttonbn->notification) && $bigbluebuttonbn->notification) {
387
        bigbluebuttonbn_process_post_save_notification($bigbluebuttonbn);
388
    }
389
    bigbluebuttonbn_process_post_save_event($bigbluebuttonbn);
390
}
391
392
/**
393
 * Generates a message on insert/update which is sent to all users enrolled.
394
 *
395
 * @global object
396
 *
397
 * @param object $bigbluebuttonbn BigBlueButtonBN form data
398
 **/
399
function bigbluebuttonbn_process_post_save_notification(&$bigbluebuttonbn) {
400
    $action = get_string('mod_form_field_notification_msg_modified', 'bigbluebuttonbn');
401
    if (isset($bigbluebuttonbn->add) && !empty($bigbluebuttonbn->add)) {
402
        $action = get_string('mod_form_field_notification_msg_created', 'bigbluebuttonbn');
403
    }
404
    $context = context_course::instance($bigbluebuttonbn->course);
405
    \mod_bigbluebuttonbn\locallib\notifier::notification_process($context, $bigbluebuttonbn, $action);
406
}
407
408
/**
409
 * Generates an event after a bigbluebuttonbn insert/update.
410
 *
411
 * @global object
412
 *
413
 * @param object $bigbluebuttonbn BigBlueButtonBN form data
414
 **/
415
function bigbluebuttonbn_process_post_save_event(&$bigbluebuttonbn) {
416
    global $DB;
417
    // Delete evento to the calendar when/if openingtime is NOT set.
418
    if (!isset($bigbluebuttonbn->openingtime) || !$bigbluebuttonbn->openingtime) {
419
        $DB->delete_records('event', array('modulename' => 'bigbluebuttonbn', 'instance' => $bigbluebuttonbn->id));
420
        return;
421
    }
422
    // Add evento to the calendar as openingtime is set.
423
    $event = new stdClass();
424
    $event->name = $bigbluebuttonbn->name;
425
    $event->courseid = $bigbluebuttonbn->course;
426
    $event->groupid = 0;
427
    $event->userid = 0;
428
    $event->modulename = 'bigbluebuttonbn';
429
    $event->instance = $bigbluebuttonbn->id;
430
    $event->timestart = $bigbluebuttonbn->openingtime;
431
    $event->durationtime = 0;
432
    if ($bigbluebuttonbn->closingtime) {
433
        $event->durationtime = $bigbluebuttonbn->closingtime - $bigbluebuttonbn->openingtime;
434
    }
435
    $event->id = $DB->get_field('event', 'id', array('modulename' => 'bigbluebuttonbn',
436
        'instance' => $bigbluebuttonbn->id));
437
    if ($event->id) {
438
        $calendarevent = calendar_event::load($event->id);
439
        $calendarevent->update($event);
440
        return;
441
    }
442
    calendar_event::create($event);
443
}
444
445
/**
446
 * Get a full path to the file attached as a preuploaded presentation
447
 * or if there is none, set the presentation field will be set to blank.
448
 *
449
 * @param object $bigbluebuttonbn BigBlueButtonBN form data
450
 */
451
function bigbluebuttonbn_get_media_file(&$bigbluebuttonbn) {
452
    global $DB;
453
    $draftitemid = isset($bigbluebuttonbn->presentation) ? $bigbluebuttonbn->presentation : null;
454
    $context = context_module::instance($bigbluebuttonbn->coursemodule);
455
    // Set the filestorage object.
456
    $fs = get_file_storage();
457
    // Save the file if it exists that is currently in the draft area.
458
    file_save_draft_area_files($draftitemid, $context->id, 'mod_bigbluebuttonbn', 'presentation', 0);
459
    // Get the file if it exists.
460
    $files = $fs->get_area_files($context->id, 'mod_bigbluebuttonbn', 'presentation', 0,
461
        'itemid, filepath, filename', false);
462
    // Check that there is a file to process.
463
    $filesrc = '';
464
    if (count($files) == 1) {
465
        // Get the first (and only) file.
466
        $file = reset($files);
467
        $filesrc = '/'.$file->get_filename();
468
    }
469
    return $filesrc;
470
}
471
472
/**
473
 * Serves the bigbluebuttonbn attachments. Implements needed access control ;-).
474
 *
475
 * @category files
476
 *
477
 * @param stdClass $course        course object
478
 * @param stdClass $cm            course module object
479
 * @param stdClass $context       context object
480
 * @param string   $filearea      file area
481
 * @param array    $args          extra arguments
482
 * @param bool     $forcedownload whether or not force download
483
 * @param array    $options       additional options affecting the file serving
484
 *
485
 * @return false|null false if file not found, does not return if found - justsend the file
486
 */
487
function bigbluebuttonbn_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) {
488
    if (!bigbluebuttonbn_pluginfile_valid($context, $filearea)) {
489
        return false;
490
    }
491
    $file = bigbluebuttonbn_pluginfile_file($course, $cm, $context, $filearea, $args);
492
    if (!$file) {
493
        return false;
494
    }
495
    // Finally send the file.
496
    send_stored_file($file, 0, 0, $forcedownload, $options); // download MUST be forced - security!
497
}
498
499
function bigbluebuttonbn_pluginfile_valid($context, $filearea) {
500
    if ($context->contextlevel != CONTEXT_MODULE) {
501
        return false;
502
    }
503
    if ($filearea !== 'presentation') {
504
        return false;
505
    }
506
    if (!array_key_exists($filearea, bigbluebuttonbn_get_file_areas())) {
507
        return false;
508
    }
509
    return true;
510
}
511
512
function bigbluebuttonbn_pluginfile_file($course, $cm, $context, $filearea, $args) {
513
    $filename = bigbluebuttonbn_pluginfile_filename($course, $cm, $context, $args);
514
    if (!$filename) {
515
        return false;
516
    }
517
    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename;
518
    $fs = get_file_storage();
519
    $file = $fs->get_file_by_hash(sha1($fullpath));
520
    if (!$file || $file->is_directory()) {
521
        return false;
522
    }
523
    return $file;
524
}
525
526
function bigbluebuttonbn_pluginfile_filename($course, $cm, $context, $args) {
527
    global $DB;
528
    if (count($args) > 1) {
529
        if (!$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $cm->instance))) {
530
            return;
531
        }
532
        $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'presentation_cache');
533
        $noncekey = sha1($bigbluebuttonbn->id);
534
        $presentationnonce = $cache->get($noncekey);
535
        $noncevalue = $presentationnonce['value'];
536
        $noncecounter = $presentationnonce['counter'];
537
        if ($args['0'] != $noncevalue) {
538
            return;
539
        }
540
        // The nonce value is actually used twice because BigBlueButton reads the file two times.
541
        $noncecounter += 1;
542
        $cache->set($noncekey, array('value' => $noncevalue, 'counter' => $noncecounter));
543
        if ($noncecounter == 2) {
544
            $cache->delete($noncekey);
545
        }
546
        return $args['1'];
547
    }
548
    require_course_login($course, true, $cm);
549
    if (!has_capability('mod/bigbluebuttonbn:join', $context)) {
550
        return;
551
    }
552
    return implode('/', $args);
553
}
554
555
/**
556
 * Returns an array of file areas.
557
 *
558
 * @category files
559
 *
560
 * @return array a list of available file areas
561
 */
562
function bigbluebuttonbn_get_file_areas() {
563
    $areas = array();
564
    $areas['presentation'] = get_string('mod_form_block_presentation', 'bigbluebuttonbn');
565
    return $areas;
566
}
567