|
@@ 2634-2640 (lines=7) @@
|
| 2631 |
|
* |
| 2632 |
|
* @return array |
| 2633 |
|
*/ |
| 2634 |
|
function bigbluebuttonbn_view_instance_id($id) { |
| 2635 |
|
global $DB; |
| 2636 |
|
$cm = get_coursemodule_from_id('bigbluebuttonbn', $id, 0, false, MUST_EXIST); |
| 2637 |
|
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST); |
| 2638 |
|
$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $cm->instance), '*', MUST_EXIST); |
| 2639 |
|
return array('cm' => $cm, 'course' => $course, 'bigbluebuttonbn' => $bigbluebuttonbn); |
| 2640 |
|
} |
| 2641 |
|
|
| 2642 |
|
/** |
| 2643 |
|
* Helper function returns array with the instance settings used in views based on bigbluebuttonbnid. |
|
@@ 2649-2655 (lines=7) @@
|
| 2646 |
|
* |
| 2647 |
|
* @return array |
| 2648 |
|
*/ |
| 2649 |
|
function bigbluebuttonbn_view_instance_bigbluebuttonbn($bigbluebuttonbnid) { |
| 2650 |
|
global $DB; |
| 2651 |
|
$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $bigbluebuttonbnid), '*', MUST_EXIST); |
| 2652 |
|
$course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST); |
| 2653 |
|
$cm = get_coursemodule_from_instance('bigbluebuttonbn', $bigbluebuttonbn->id, $course->id, false, MUST_EXIST); |
| 2654 |
|
return array('cm' => $cm, 'course' => $course, 'bigbluebuttonbn' => $bigbluebuttonbn); |
| 2655 |
|
} |
| 2656 |
|
|
| 2657 |
|
/** |
| 2658 |
|
* Helper function renders general settings if the feature is enabled. |