1 |
efrain |
1 |
// This file is part of Moodle - http://moodle.org/
|
|
|
2 |
//
|
|
|
3 |
// Moodle is free software: you can redistribute it and/or modify
|
|
|
4 |
// it under the terms of the GNU General Public License as published by
|
|
|
5 |
// the Free Software Foundation, either version 3 of the License, or
|
|
|
6 |
// (at your option) any later version.
|
|
|
7 |
//
|
|
|
8 |
// Moodle is distributed in the hope that it will be useful,
|
|
|
9 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
10 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
11 |
// GNU General Public License for more details.
|
|
|
12 |
//
|
|
|
13 |
// You should have received a copy of the GNU General Public License
|
|
|
14 |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
15 |
|
|
|
16 |
/**
|
|
|
17 |
* This file is part of the Moodle apps support for the choicegroup plugin.
|
|
|
18 |
* Defines the function to be used from the mobile course view template.
|
|
|
19 |
*
|
|
|
20 |
* @package mod_bigbluebuttonbn
|
|
|
21 |
* @copyright 2010 onwards, Blindside Networks Inc
|
|
|
22 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
23 |
* @author Laurent David (laurent [at] call-learning [dt] fr)
|
|
|
24 |
*/
|
|
|
25 |
|
|
|
26 |
// That will be the global this (ionic convention).
|
|
|
27 |
var that = this;
|
|
|
28 |
|
|
|
29 |
var TIMEOUTCHECK = 20000;
|
|
|
30 |
|
|
|
31 |
that.onCanJoinReturns = function (data) {
|
|
|
32 |
if (data && data.can_join) {
|
|
|
33 |
that.openContent('', {'cmid': data.cmid}, 'mod_bigbluebuttonbn', 'mobile_course_view');
|
|
|
34 |
} else {
|
|
|
35 |
setTimeout(function () {
|
|
|
36 |
that.refreshContent(true);
|
|
|
37 |
}, TIMEOUTCHECK);
|
|
|
38 |
}
|
|
|
39 |
};
|