|
@@ 2538-2544 (lines=7) @@
|
| 2535 |
|
* |
| 2536 |
|
* @return array |
| 2537 |
|
*/ |
| 2538 |
|
function bigbluebuttonbn_view_instance_id($id) { |
| 2539 |
|
global $DB; |
| 2540 |
|
$cm = get_coursemodule_from_id('bigbluebuttonbn', $id, 0, false, MUST_EXIST); |
| 2541 |
|
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST); |
| 2542 |
|
$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $cm->instance), '*', MUST_EXIST); |
| 2543 |
|
return array('cm' => $cm, 'course' => $course, 'bigbluebuttonbn' => $bigbluebuttonbn); |
| 2544 |
|
} |
| 2545 |
|
|
| 2546 |
|
/** |
| 2547 |
|
* Helper function returns array with the instance settings used in views based on bigbluebuttonbnid. |
|
@@ 2553-2559 (lines=7) @@
|
| 2550 |
|
* |
| 2551 |
|
* @return array |
| 2552 |
|
*/ |
| 2553 |
|
function bigbluebuttonbn_view_instance_bigbluebuttonbn($bigbluebuttonbnid) { |
| 2554 |
|
global $DB; |
| 2555 |
|
$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $bigbluebuttonbnid), '*', MUST_EXIST); |
| 2556 |
|
$course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST); |
| 2557 |
|
$cm = get_coursemodule_from_instance('bigbluebuttonbn', $bigbluebuttonbn->id, $course->id, false, MUST_EXIST); |
| 2558 |
|
return array('cm' => $cm, 'course' => $course, 'bigbluebuttonbn' => $bigbluebuttonbn); |
| 2559 |
|
} |
| 2560 |
|
|
| 2561 |
|
/** |
| 2562 |
|
* Helper function renders general settings if the feature is enabled. |