Skip to content

Commit

Permalink
Merge branch 'VID-676' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dthies committed Aug 2, 2023
2 parents 9ec7d14 + fca85a2 commit b967be7
Show file tree
Hide file tree
Showing 25 changed files with 2,469 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tab/venue/amd/build/venue_manager.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tab/venue/amd/build/venue_manager.min.js.map

Large diffs are not rendered by default.

828 changes: 828 additions & 0 deletions tab/venue/amd/src/venue_manager.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Defines backup_videotimetab_venue_subplugin class
*
* @package videotimetab_venue
* @copyright 2023 bdecent gmbh <https://bdecent.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

/**
* Defines backup_videotimetab_venue_subplugin class
*
* Provides the step to perform back up of sublugin data
*/
class backup_videotimetab_venue_subplugin extends backup_subplugin {

/**
* Defined suplugin structure step
*/
protected function define_videotime_subplugin_structure() {

// Create XML elements.
$subplugin = $this->get_subplugin_element();
$subpluginwrapper = new backup_nested_element($this->get_recommended_name());
$subplugintablesettings = new backup_nested_element('videotimetab_venue',
null, array('videotime'));

// Connect XML elements into the tree.
$subplugin->add_child($subpluginwrapper);
$subpluginwrapper->add_child($subplugintablesettings);

// Set source to populate the data.
$subplugintablesettings->set_source_table('videotimetab_venue',
array('videotime' => backup::VAR_ACTIVITYID));

return $subplugin;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* videotime restore task
*
* provides all the settings and steps to perform one * complete restore of the activity
*
* @package videotimetab_venue
* @copyright 2023 bdecent gmbh <https://bdecent.de>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

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

require_once($CFG->dirroot . '/mod/videotime/backup/moodle2/restore_videotime_stepslib.php'); // Because it exists (must).

/**
* Define restore step for videotime tab plugin
*
* restore subplugin class that provides the data
* needed to restore one videotimetab_venue subplugin.
*/
class restore_videotimetab_venue_subplugin extends restore_subplugin {

/**
* Define subplugin structure
*
*/
protected function define_videotime_subplugin_structure() {

$paths = array();

$elename = $this->get_namefor('');
$elepath = $this->get_pathfor('/videotimetab_venue');
$paths[] = new restore_path_element($elename, $elepath);

return $paths;
}

/**
* Processes the videotimetab_venue element, if it is in the file.
* @param array $data the data read from the XML file.
*/
public function process_videotimetab_venue($data) {
global $DB;

$data = (object)$data;
$oldvideotime = $data->videotime;
$data->videotime = $this->get_new_parentid('videotime');
$DB->insert_record('videotimetab_venue', $data);
}
}
90 changes: 90 additions & 0 deletions tab/venue/classes/event/audiobridge_launched.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.

namespace videotimetab_venue\event;

use \core\event\base;

/**
* The audiobridge launched event
*
* @package videotimetab_venue
* @category event
* @copyright 2023 bdecent gmbh <https://bdecent.de>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class audiobridge_launched extends base {

/**
* Set all required data properties:
*
* @return void
*/
protected function init() {
$this->data['crud'] = 'r';
$this->data['edulevel'] = self::LEVEL_PARTICIPATING;
$this->data['objecttable'] = 'videotime';
}

/**
* Validate their custom data (such as $this->data['other'], contextlevel, etc.).
*
* Throw \coding_exception or debugging() notice in case of any problems.
*/
protected function validate_data() {
// Override if you want to validate event properties when
// creating new events.
}

/**
* Returns localised general event name.
*
* Override in subclass, we can not make it static and abstract at the same time.
*
* @return string
*/
public static function get_name() {
return get_string('eventaudiobridgelaunched', 'block_deft');
}

/**
* Get backup mappinig
*
* @return array
*/
public static function get_objectid_mapping() {
return ['db' => 'videotime', 'restore' => 'id'];
}

/**
* Get URL related to the action.
*
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/mod/videotime/view.php', ['v' => $this->objectid]);
}

/**
* Returns non-localised event description with id's for admin use only.
*
* @return string
*/
public function get_description() {
return "The user with id '$this->userid' joined audiobridge in venue tab for Video Time activity with id '$this->objectid'.";
}

}
79 changes: 79 additions & 0 deletions tab/venue/classes/event/hand_lower_sent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.

namespace videotimetab_venue\event;

use \core\event\base;

/**
* The hand lower event
*
* @package videotimetab_venue
* @category event
* @copyright 2023 bdecent gmbh <https://bdecent.de>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class hand_lower_sent extends base {

/**
* Set all required data properties:
*
* @return void
*/
protected function init() {
$this->data['crud'] = 'r';
$this->data['edulevel'] = self::LEVEL_PARTICIPATING;
$this->data['objecttable'] = 'videotime';
}

/**
* Returns localised general event name.
*
* Override in subclass, we can not make it static and abstract at the same time.
*
* @return string
*/
public static function get_name() {
return get_string('eventhandlowersent', 'block_deft');
}

/**
* Get backup mappinig
*
* @return array
*/
public static function get_objectid_mapping() {
return ['db' => 'videotime', 'restore' => 'id'];
}

/**
* Get URL related to the action.
*
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/mod/videotime/view.php', ['v' => $this->objectid]);
}

/**
* Returns non-localised event description with id's for admin use only.
*
* @return string
*/
public function get_description() {
return "The user with id '$this->userid' has lowered hand in venue tab of Video Time activity with id '$this->objectid'.";
}
}
79 changes: 79 additions & 0 deletions tab/venue/classes/event/hand_raise_sent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.

namespace videotimetab_venue\event;

use \core\event\base;

/**
* The hand raise event
*
* @package videotimetab_venue
* @category event
* @copyright 2023 bdecent gmbh <https://bdecent.de>
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class hand_raise_sent extends base {

/**
* Set all required data properties:
*
* @return void
*/
protected function init() {
$this->data['crud'] = 'r';
$this->data['edulevel'] = self::LEVEL_PARTICIPATING;
$this->data['objecttable'] = 'videotime';
}

/**
* Returns localised general event name.
*
* Override in subclass, we can not make it static and abstract at the same time.
*
* @return string
*/
public static function get_name() {
return get_string('eventhandraisesent', 'block_deft');
}

/**
* Get backup mappinig
*
* @return array
*/
public static function get_objectid_mapping() {
return ['db' => 'videotime', 'restore' => 'id'];
}

/**
* Get URL related to the action.
*
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/mod/videotime/view.php', ['v' => $this->objectid]);
}

/**
* Returns non-localised event description with id's for admin use only.
*
* @return string
*/
public function get_description() {
return "The user with id '$this->userid' has raised hand in venue tab of Video Time activity with id '$this->objectid'.";
}
}
Loading

0 comments on commit b967be7

Please sign in to comment.