|
@@ 2377-2383 (lines=7) @@
|
| 2374 |
|
* |
| 2375 |
|
* @return array |
| 2376 |
|
*/ |
| 2377 |
|
function bigbluebuttonbn_view_instance_id($id) { |
| 2378 |
|
global $DB; |
| 2379 |
|
$cm = get_coursemodule_from_id('bigbluebuttonbn', $id, 0, false, MUST_EXIST); |
| 2380 |
|
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST); |
| 2381 |
|
$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $cm->instance), '*', MUST_EXIST); |
| 2382 |
|
return array('cm' => $cm, 'course' => $course, 'bigbluebuttonbn' => $bigbluebuttonbn); |
| 2383 |
|
} |
| 2384 |
|
|
| 2385 |
|
/** |
| 2386 |
|
* Helper function returns array with the instance settings used in views based on bigbluebuttonbnid. |
|
@@ 2392-2398 (lines=7) @@
|
| 2389 |
|
* |
| 2390 |
|
* @return array |
| 2391 |
|
*/ |
| 2392 |
|
function bigbluebuttonbn_view_instance_bigbluebuttonbn($bigbluebuttonbnid) { |
| 2393 |
|
global $DB; |
| 2394 |
|
$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $bigbluebuttonbnid), '*', MUST_EXIST); |
| 2395 |
|
$course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST); |
| 2396 |
|
$cm = get_coursemodule_from_instance('bigbluebuttonbn', $bigbluebuttonbn->id, $course->id, false, MUST_EXIST); |
| 2397 |
|
return array('cm' => $cm, 'course' => $course, 'bigbluebuttonbn' => $bigbluebuttonbn); |
| 2398 |
|
} |
| 2399 |
|
|
| 2400 |
|
/** |
| 2401 |
|
* Helper function renders general warning message for settings (if any). |