|
@@ 2607-2613 (lines=7) @@
|
| 2604 |
|
* |
| 2605 |
|
* @return array |
| 2606 |
|
*/ |
| 2607 |
|
function bigbluebuttonbn_view_instance_id($id) { |
| 2608 |
|
global $DB; |
| 2609 |
|
$cm = get_coursemodule_from_id('bigbluebuttonbn', $id, 0, false, MUST_EXIST); |
| 2610 |
|
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST); |
| 2611 |
|
$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $cm->instance), '*', MUST_EXIST); |
| 2612 |
|
return array('cm' => $cm, 'course' => $course, 'bigbluebuttonbn' => $bigbluebuttonbn); |
| 2613 |
|
} |
| 2614 |
|
|
| 2615 |
|
/** |
| 2616 |
|
* Helper function returns array with the instance settings used in views based on bigbluebuttonbnid. |
|
@@ 2622-2628 (lines=7) @@
|
| 2619 |
|
* |
| 2620 |
|
* @return array |
| 2621 |
|
*/ |
| 2622 |
|
function bigbluebuttonbn_view_instance_bigbluebuttonbn($bigbluebuttonbnid) { |
| 2623 |
|
global $DB; |
| 2624 |
|
$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $bigbluebuttonbnid), '*', MUST_EXIST); |
| 2625 |
|
$course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST); |
| 2626 |
|
$cm = get_coursemodule_from_instance('bigbluebuttonbn', $bigbluebuttonbn->id, $course->id, false, MUST_EXIST); |
| 2627 |
|
return array('cm' => $cm, 'course' => $course, 'bigbluebuttonbn' => $bigbluebuttonbn); |
| 2628 |
|
} |
| 2629 |
|
|
| 2630 |
|
/** |
| 2631 |
|
* Helper function renders general settings if the feature is enabled. |