Skip to content

Commit

Permalink
VID-707: Prepare release candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Thies committed Oct 10, 2023
1 parent 7084375 commit c40c913
Show file tree
Hide file tree
Showing 14 changed files with 167 additions and 79 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,18 @@ jobs:
- php: '8.0'
moodle-branch: 'master'
database: 'pgsql'
- php: '8.0'
- php: '8.1'
moodle-branch: 'master'
database: 'mariadb'
- php: '8.0'
moodle-branch: 'MOODLE_402_STABLE'
- php: '8.1'
moodle-branch: 'MOODLE_403_STABLE'
database: 'pgsql'
- php: '8.0'
moodle-branch: 'MOODLE_402_STABLE'
moodle-branch: 'MOODLE_403_STABLE'
database: 'mariadb'
- php: '8.0'
moodle-branch: 'MOODLE_402_STABLE'
database: 'pgsql'

steps:
- name: Check out repository code
Expand Down Expand Up @@ -101,7 +104,7 @@ jobs:
run: moodle-plugin-ci mustache

- name: Grunt
if: ${{ matrix.moodle-branch == 'MOODLE_402_STABLE' }}
if: ${{ matrix.moodle-branch == 'MOODLE_403_STABLE' }}
run: moodle-plugin-ci grunt

- name: PHPUnit tests
Expand Down
2 changes: 1 addition & 1 deletion amd/build/player.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/player.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions amd/src/player.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions classes/plugininfo/videotimeplugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ public function available_updates() {
switch ($this->name) {
case 'pro':
$info = array(
'maturity' => MATURITY_STABLE,
'release' => '1.7.1',
'version' => 2023050100,
'maturity' => MATURITY_RC,
'release' => '1.8 RC',
'version' => 2023101100,
);
break;
case 'repository':
$info = array(
'maturity' => MATURITY_STABLE,
'release' => '1.7.1',
'version' => 2023011202,
'maturity' => MATURITY_RC,
'release' => '1.8',
'version' => 2023101100,
);
break;
}
Expand Down
104 changes: 53 additions & 51 deletions classes/videotime_instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
use cm_info;
use core_component;
use core_external\external_description;
use core_external\external_single_structure;
use core_external\external_value;
use mod_videotime\local\tabs\tabs;
use mod_videotime\output\next_activity_button;
use renderer_base;
Expand Down Expand Up @@ -508,57 +510,57 @@ public function export_for_template(renderer_base $output) {
* @return external_description
*/
public static function get_external_description(): external_description {
return new \external_single_structure([
'id' => new \external_value(PARAM_INT),
'course' => new \external_value(PARAM_INT),
'name' => new \external_value(PARAM_RAW),
'intro' => new \external_value(PARAM_RAW),
'introformat' => new \external_value(PARAM_INT),
'vimeo_url' => new \external_value(PARAM_URL),
'video_description' => new \external_value(PARAM_RAW),
'video_description_format' => new \external_value(PARAM_INT),
'timemodified' => new \external_value(PARAM_INT),
'completion_on_view_time' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'completion_on_view_time_second' => new \external_value(PARAM_INT, '', VALUE_OPTIONAL),
'completion_on_finish' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'completion_on_percent' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'completion_on_percent_value' => new \external_value(PARAM_INT, '', VALUE_OPTIONAL),
'autoplay' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'byline' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'color' => new \external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'height' => new \external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'maxheight' => new \external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'maxwidth' => new \external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'muted' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'playsinline' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'portrait' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'speed' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'title' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'transparent' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'type' => new \external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'autopause' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'background' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'controls' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'pip' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'dnt' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'width' => new \external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'responsive' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'label_mode' => new \external_value(PARAM_INT, '', VALUE_OPTIONAL),
'viewpercentgrade' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'next_activity_button' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'next_activity_id' => new \external_value(PARAM_INT, '', VALUE_OPTIONAL),
'next_activity_auto' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'option_loop' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'resume_playback' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'resume_time' => new \external_value(PARAM_INT, '', VALUE_OPTIONAL),
'preview_picture' => new \external_value(PARAM_INT, '', VALUE_OPTIONAL),
'show_description' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'show_title' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'show_tags' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'show_duration' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'show_viewed_duration' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'columns' => new \external_value(PARAM_INT, '', VALUE_OPTIONAL),
'preventfastforwarding' => new \external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
return new external_single_structure([
'id' => new external_value(PARAM_INT),
'course' => new external_value(PARAM_INT),
'name' => new external_value(PARAM_RAW),
'intro' => new external_value(PARAM_RAW),
'introformat' => new external_value(PARAM_INT),
'vimeo_url' => new external_value(PARAM_URL),
'video_description' => new external_value(PARAM_RAW),
'video_description_format' => new external_value(PARAM_INT),
'timemodified' => new external_value(PARAM_INT),
'completion_on_view_time' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'completion_on_view_time_second' => new external_value(PARAM_INT, '', VALUE_OPTIONAL),
'completion_on_finish' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'completion_on_percent' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'completion_on_percent_value' => new external_value(PARAM_INT, '', VALUE_OPTIONAL),
'autoplay' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'byline' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'color' => new external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'height' => new external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'maxheight' => new external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'maxwidth' => new external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'muted' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'playsinline' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'portrait' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'speed' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'title' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'transparent' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'type' => new external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'autopause' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'background' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'controls' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'pip' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'dnt' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'width' => new external_value(PARAM_TEXT, '', VALUE_OPTIONAL),
'responsive' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'label_mode' => new external_value(PARAM_INT, '', VALUE_OPTIONAL),
'viewpercentgrade' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'next_activity_button' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'next_activity_id' => new external_value(PARAM_INT, '', VALUE_OPTIONAL),
'next_activity_auto' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'option_loop' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'resume_playback' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'resume_time' => new external_value(PARAM_INT, '', VALUE_OPTIONAL),
'preview_picture' => new external_value(PARAM_INT, '', VALUE_OPTIONAL),
'show_description' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'show_title' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'show_tags' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'show_duration' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'show_viewed_duration' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
'columns' => new external_value(PARAM_INT, '', VALUE_OPTIONAL),
'preventfastforwarding' => new external_value(PARAM_BOOL, '', VALUE_OPTIONAL),
]);
}

Expand Down
1 change: 1 addition & 0 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ function videotime_add_instance($moduleinstance, $mform = null) {
'maxheight' => 0,
'maxwidth' => 0,
'width' => 0,
'vimeo_url' => '',
] + (array) $moduleinstance;

$moduleinstance = (object) $moduleinstance;
Expand Down
33 changes: 32 additions & 1 deletion plugin/live/classes/external/join_room.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,26 @@
* @copyright 2023 bdecent gmbh <https://bdecent.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class join_room extends \block_deft\external\join_room {
class join_room extends external_api {

/**
* Get parameter definition for raise hand
*
* @return external_function_parameters
*/
public static function execute_parameters(): external_function_parameters {
return new external_function_parameters(
[
'handle' => new external_value(PARAM_INT, 'Plugin handle id'),
'id' => new external_value(PARAM_INT, 'Peer id for user session'),
'plugin' => new external_value(PARAM_TEXT, 'Janus plugin name'),
'ptype' => new external_value(PARAM_BOOL, 'Whether video pubisher', VALUE_DEFAULT, false),
'room' => new external_value(PARAM_INT, 'Room id being joined'),
'session' => new external_value(PARAM_INT, 'Janus session id'),
'feed' => new external_value(PARAM_INT, 'Initial feed', VALUE_DEFAULT, 0),
]
);
}

/**
* Join room
Expand Down Expand Up @@ -114,4 +133,16 @@ public static function execute($handle, $id, $plugin, $ptype, $room, $session, $
'id' => (int) $feedid ?? 0,
];
}

/**
* Get return definition for hand_raise
*
* @return external_single_structure
*/
public static function execute_returns(): external_single_structure {
return new external_single_structure([
'status' => new external_value(PARAM_BOOL, 'Whether successful'),
'id' => new external_value(PARAM_INT, 'New video session id'),
]);
}
}
29 changes: 28 additions & 1 deletion plugin/live/classes/external/publish_feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,23 @@
* @copyright 2023 bdecent gmbh <https://bdecent.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class publish_feed extends \block_deft\external\publish_feed {
class publish_feed extends external_api {

/**
* Get parameter definition for raise hand
*
* @return external_function_parameters
*/
public static function execute_parameters(): external_function_parameters {
return new external_function_parameters(
[
'id' => new external_value(PARAM_INT, 'Peer id for user session'),
'publish' => new external_value(PARAM_BOOL, 'Whhether to publish or not', VALUE_DEFAULT, true),
'room' => new external_value(PARAM_INT, 'Room id being joined'),
]
);
}

/**
* Publish feed
*
Expand Down Expand Up @@ -130,4 +146,15 @@ public static function execute($id, $publish, $room): array {
'status' => true,
];
}

/**
* Get return definition for hand_raise
*
* @return external_single_structure
*/
public static function execute_returns(): external_single_structure {
return new external_single_structure([
'status' => new external_value(PARAM_BOOL, 'Whether changed'),
]);
}
}
26 changes: 25 additions & 1 deletion plugin/live/classes/external/renew_token.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,20 @@
* @copyright 2023 bdecent gmbh <https://bdecent.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class renew_token extends \block_deft\external\renew_token {
class renew_token extends external_api {

/**
* Get parameter definition for renew_token.
*
* @return external_function_parameters
*/
public static function execute_parameters(): external_function_parameters {
return new external_function_parameters(
[
'contextid' => new external_value(PARAM_INT, 'Block context id'),
]
);
}

/**
* Get new token
Expand All @@ -55,4 +68,15 @@ public static function execute($contextid): array {
'token' => $token,
];
}

/**
* Get return definition for renew_token
*
* @return external_single_structure
*/
public static function execute_returns(): external_single_structure {
return new external_single_structure([
'token' => new external_value(PARAM_ALPHANUM, 'Valid authentication token for deftly.us'),
]);
}
}
4 changes: 2 additions & 2 deletions plugin/live/lang/en/videotimeplugin_live.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

defined('MOODLE_INTERNAL') || die();

$string['deft:moderate'] = 'Moderate venue';
$string['deft:sharevideo'] = 'Share video';
$string['enabledeftvideo'] = 'The Video Time live player requires the
admin to install Deft response block and enable video bridging in the
site settings';
$string['live:moderate'] = 'Moderate video';
$string['live:sharevideo'] = 'Share video';
$string['livefeed'] = 'Live feed';
$string['livefeed_help'] = 'Live feed can be supplied by a teacher';
$string['mediafile_help'] = 'Upload an audio or video file to use';
Expand Down
8 changes: 4 additions & 4 deletions plugin/live/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'videotimeplugin_live';
$plugin->release = '1.8';
$plugin->version = 2023082000;
$plugin->requires = 2015111610;
$plugin->release = '1.8 Beta';
$plugin->version = 2023101100;
$plugin->requires = 2023042400;
$plugin->maturity = MATURITY_BETA;
$plugin->dependencies = [
'videotime' => 2023011200,
'videotime' => 2023101100,
'media_videojs' => 2015111600,
];
2 changes: 1 addition & 1 deletion thirdpartylibs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<location>amd/src/player.js</location>
<name>Vimeo Player API</name>
<license>MIT</license>
<version>v2.18.0</version>
<version>v2.20.1</version>
<licenseversion></licenseversion>
</library>
<library>
Expand Down
6 changes: 3 additions & 3 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_videotime';
$plugin->release = '1.8';
$plugin->version = 2023050103;
$plugin->release = '1.8 RC';
$plugin->version = 2023101100;
$plugin->requires = 2023042400;
$plugin->maturity = MATURITY_BETA;
$plugin->maturity = MATURITY_RC;

0 comments on commit c40c913

Please sign in to comment.