mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 18:04:43 +02:00
Merge branch 'MDL-75894-master' of https://github.com/jleyva/moodle
This commit is contained in:
commit
d98380b272
@ -97,7 +97,13 @@ class meeting_info extends external_api {
|
||||
bigbluebutton_proxy::get_server_not_available_url($instance),
|
||||
bigbluebutton_proxy::get_server_not_available_message($instance));
|
||||
}
|
||||
return (array) meeting::get_meeting_info_for_instance($instance, $updatecache);
|
||||
$meetinginfo = (array) meeting::get_meeting_info_for_instance($instance, $updatecache);
|
||||
|
||||
// Make the structure WS friendly.
|
||||
array_walk($meetinginfo['features'], function(&$value, $key){
|
||||
$value = ['name' => $key, 'isenabled' => (bool) $value];
|
||||
});
|
||||
return $meetinginfo;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -134,6 +140,12 @@ class meeting_info extends external_api {
|
||||
])
|
||||
),
|
||||
'joinurl' => new external_value(PARAM_URL, 'Join URL'),
|
||||
'features' => new \external_multiple_structure(
|
||||
new external_single_structure([
|
||||
'name' => new external_value(PARAM_ALPHA, 'Feature name.'),
|
||||
'isenabled' => new external_value(PARAM_BOOL, 'Whether the feature is enabled.'),
|
||||
]), 'List of features for the instance', VALUE_OPTIONAL
|
||||
),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -281,6 +281,9 @@ class meeting {
|
||||
$meetinginfo->attendees[] = (array) $attendee;
|
||||
}
|
||||
}
|
||||
|
||||
$meetinginfo->features = $instance->get_enabled_features();
|
||||
|
||||
return $meetinginfo;
|
||||
}
|
||||
|
||||
|
@ -155,6 +155,17 @@ class meeting_test extends \advanced_testcase {
|
||||
$meeting->update_cache();
|
||||
$meetinginfo = $meeting->get_meeting_info();
|
||||
$this->assertFalse($meetinginfo->statusrunning);
|
||||
|
||||
if ($type == instance::TYPE_ALL) {
|
||||
$this->assertTrue($meetinginfo->features['showroom']);
|
||||
$this->assertTrue($meetinginfo->features['showrecordings']);
|
||||
} else if ($type == instance::TYPE_ROOM_ONLY) {
|
||||
$this->assertTrue($meetinginfo->features['showroom']);
|
||||
$this->assertFalse($meetinginfo->features['showrecordings']);
|
||||
} else if ($type == instance::TYPE_RECORDING_ONLY) {
|
||||
$this->assertFalse($meetinginfo->features['showroom']);
|
||||
$this->assertTrue($meetinginfo->features['showrecordings']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
5
mod/bigbluebuttonbn/upgrade.txt
Normal file
5
mod/bigbluebuttonbn/upgrade.txt
Normal file
@ -0,0 +1,5 @@
|
||||
This files describes API changes in the bigbluebuttonbn code.
|
||||
|
||||
=== 4.1 ===
|
||||
* External function mod_bigbluebuttonbn\external\meeting_info now return the list of the instance features and whether they are
|
||||
enabled or not.
|
Loading…
x
Reference in New Issue
Block a user