mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-74986 mod_bigbluebuttonbn: Outline display is a bit verbose
* Change language string to shorten the user outline display
This commit is contained in:
parent
e4c5a12a1c
commit
76e77b6385
2 changed files with 37 additions and 6 deletions
|
@ -375,9 +375,9 @@ $string['mod_form_field_disablenote'] = 'Disable shared notes';
|
||||||
$string['mod_form_field_hideuserlist'] = 'Hide user list';
|
$string['mod_form_field_hideuserlist'] = 'Hide user list';
|
||||||
$string['mod_form_field_lockonjoin'] = 'Lock settings on join';
|
$string['mod_form_field_lockonjoin'] = 'Lock settings on join';
|
||||||
$string['mod_form_locksettings'] = 'Lock settings';
|
$string['mod_form_locksettings'] = 'Lock settings';
|
||||||
$string['report_join_info'] = 'Has joined the room {$a} time(s)';
|
$string['report_join_info'] = '{$a} meeting(s)';
|
||||||
$string['report_play_recording_info'] = 'Has played a recording {$a} time(s)';
|
$string['report_play_recording_info'] = '{$a} recording(s) played';
|
||||||
$string['report_room_view'] = 'Has viewed the room';
|
$string['report_room_view'] = 'viewed';
|
||||||
$string['starts_at'] = 'Starts';
|
$string['starts_at'] = 'Starts';
|
||||||
$string['started_at'] = 'Started';
|
$string['started_at'] = 'Started';
|
||||||
$string['ends_at'] = 'Ends';
|
$string['ends_at'] = 'Ends';
|
||||||
|
|
|
@ -53,11 +53,12 @@ class user_info_test extends \advanced_testcase {
|
||||||
logger::log_recording_played_event($instance, $recordings[0]->id);
|
logger::log_recording_played_event($instance, $recordings[0]->id);
|
||||||
[$logjoins, $logtimes] = user_info::get_user_info_outline($this->get_course(), $user, $bbactivitycm);
|
[$logjoins, $logtimes] = user_info::get_user_info_outline($this->get_course(), $user, $bbactivitycm);
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
'Has joined the room 1 time(s)',
|
'1 meeting(s)',
|
||||||
'Has played a recording 1 time(s)'
|
'1 recording(s) played'
|
||||||
], $logjoins);
|
], $logjoins);
|
||||||
$this->assertCount(2, $logtimes);
|
$this->assertCount(2, $logtimes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test user info outline with several logs
|
* Test user info outline with several logs
|
||||||
*
|
*
|
||||||
|
@ -78,7 +79,37 @@ class user_info_test extends \advanced_testcase {
|
||||||
|
|
||||||
[$logjoins, $logtimes] = user_info::get_user_info_outline($this->get_course(), $user, $bbactivitycm);
|
[$logjoins, $logtimes] = user_info::get_user_info_outline($this->get_course(), $user, $bbactivitycm);
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
'Has joined the room 2 time(s)',
|
'2 meeting(s)',
|
||||||
|
], $logjoins);
|
||||||
|
$this->assertCount(1, $logtimes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test user info outline for view events
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function test_get_user_info_outline_view() {
|
||||||
|
$this->initialise_mock_server();
|
||||||
|
$this->resetAfterTest();
|
||||||
|
|
||||||
|
$generator = $this->getDataGenerator();
|
||||||
|
$user = $generator->create_and_enrol($this->get_course());
|
||||||
|
list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(
|
||||||
|
null,
|
||||||
|
['completion' => 2, 'completionview' => 1]);
|
||||||
|
$this->setUser($user);
|
||||||
|
|
||||||
|
// Now create a couple of logs.
|
||||||
|
$instance = instance::get_from_instanceid($bbactivity->id);
|
||||||
|
// View it twice.
|
||||||
|
bigbluebuttonbn_view($instance->get_instance_data(), $instance->get_course(), $instance->get_cm(),
|
||||||
|
$instance->get_context());
|
||||||
|
bigbluebuttonbn_view($instance->get_instance_data(), $instance->get_course(), $instance->get_cm(),
|
||||||
|
$instance->get_context());
|
||||||
|
[$logjoins, $logtimes] = user_info::get_user_info_outline($this->get_course(), $user, $bbactivitycm);
|
||||||
|
$this->assertEquals([
|
||||||
|
'viewed',
|
||||||
], $logjoins);
|
], $logjoins);
|
||||||
$this->assertCount(1, $logtimes);
|
$this->assertCount(1, $logtimes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue