-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added panopto integration and code cleanup
- Loading branch information
Jenkins
committed
Sep 22, 2021
1 parent
f2082f3
commit 4ead5ea
Showing
120 changed files
with
3,012 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This file is used to render the admin settings page | ||
* @package mod_ivs | ||
* @author Ghostthinker GmbH <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Render all annotations | ||
* @package mod_ivs | ||
* @author Ghostthinker GmbH <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
|
@@ -61,7 +62,6 @@ | |
|
||
$renderer = $PAGE->get_renderer('ivs'); | ||
|
||
|
||
echo '<div class="ivs-annotations">'; | ||
|
||
$all_rendered_comments = []; | ||
|
@@ -74,7 +74,7 @@ | |
|
||
echo '</div>'; | ||
|
||
$renderable = new \mod_ivs\output\annotation_download($all_rendered_comments,$ivs,$cm); | ||
$renderable = new \mod_ivs\output\annotation_download($all_rendered_comments, $ivs, $cm); | ||
echo $renderer->render($renderable); | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* File for the backend | ||
* @package mod_ivs | ||
* @author Ghostthinker GmbH <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
|
@@ -103,6 +104,12 @@ | |
|
||
} | ||
|
||
/** | ||
* Callback for comments | ||
* @param array $args | ||
* @param array $postdata | ||
* @param string $requestmethod | ||
*/ | ||
function ivs_backend_comments($args, $postdata, $requestmethod) { | ||
$videoid = $args[1]; | ||
|
||
|
@@ -191,6 +198,12 @@ function ivs_backend_comments($args, $postdata, $requestmethod) { | |
} | ||
} | ||
|
||
/** | ||
* Callback for playbackcommands | ||
* @param array $args | ||
* @param array $postdata | ||
* @param string $requestmethod | ||
*/ | ||
function ivs_backend_playbackcommands($args, $postdata, $requestmethod) { | ||
$videonid = $args[1]; | ||
|
||
|
@@ -232,6 +245,7 @@ function ivs_backend_playbackcommands($args, $postdata, $requestmethod) { | |
} | ||
|
||
/** | ||
* Exit call when errors appear | ||
* @param string $data | ||
* @param int $statuscode | ||
*/ | ||
|
@@ -243,7 +257,7 @@ function ivs_backend_error_exit($data = "access denied", $statuscode = 403) { | |
|
||
/** | ||
* Exit call when successfully ended tasks | ||
* @param $data | ||
* @param string|array $data | ||
* @param int $statuscode | ||
*/ | ||
function ivs_backend_exit($data, $statuscode = 200) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This class is used to backup settings | ||
* @package mod_ivs | ||
* @author Ghostthinker GmbH <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This class is used to backup a ivs activity | ||
* @package mod_ivs | ||
* @author Ghostthinker GmbH <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
|
@@ -25,7 +26,9 @@ | |
require_once($CFG->dirroot . '/mod/ivs/backup/moodle2/backup_ivs_stepslib.php'); | ||
require_once($CFG->dirroot . '/mod/ivs/backup/moodle2/backup_course_ivs_settings_step.class.php'); | ||
|
||
|
||
/** | ||
* Class backup_ivs_activity_task | ||
*/ | ||
class backup_ivs_activity_task extends backup_activity_task { | ||
|
||
/** | ||
|
@@ -38,8 +41,6 @@ protected function define_my_settings() { | |
/** | ||
* Defines a backup step to store the instance data in the ivs.xml file | ||
*/ | ||
|
||
// Todo: Wait for answer from moodle question at https://moodle.org/mod/forum/discuss.php?d=378747#p1528693. | ||
protected function define_my_steps() { | ||
$this->add_step(new backup_ivs_activity_structure_step('ivs_structure', 'ivs.xml')); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This class is used to backup a ivs activity | ||
* @package mod_ivs | ||
* @author Ghostthinker GmbH <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
|
@@ -23,7 +24,9 @@ | |
|
||
defined('MOODLE_INTERNAL') || die; | ||
|
||
|
||
/** | ||
* Class backup_ivs_activity_structure_step | ||
*/ | ||
class backup_ivs_activity_structure_step extends backup_activity_structure_step { | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This class is used to restore ivs activitys | ||
* @package mod_ivs | ||
* @author Ghostthinker GmbH <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
|
@@ -26,6 +27,9 @@ | |
require_once($CFG->dirroot . '/mod/ivs/backup/moodle2/restore_ivs_stepslib.php'); | ||
require_once($CFG->dirroot . '/mod/ivs/backup/moodle2/restore_ivs_settingslib.php'); | ||
|
||
/** | ||
* Class restore_ivs_activity_task | ||
*/ | ||
class restore_ivs_activity_task extends restore_activity_task { | ||
|
||
/** | ||
|
@@ -78,9 +82,9 @@ public static function define_decode_rules() { | |
|
||
/** | ||
* Define the restore log rules that will be applied | ||
* by the {@link restore_logs_processor} when restoring | ||
* by the {@see restore_logs_processor} when restoring | ||
* ivs logs. It must return one array | ||
* of {@link restore_log_rule} objects | ||
* of {@see restore_log_rule} objects | ||
*/ | ||
public static function define_restore_log_rules() { | ||
$rules = array(); | ||
|
@@ -94,9 +98,9 @@ public static function define_restore_log_rules() { | |
|
||
/** | ||
* Define the restore log rules that will be applied | ||
* by the {@link restore_logs_processor} when restoring | ||
* by the {@see restore_logs_processor} when restoring | ||
* course logs. It must return one array | ||
* of {@link restore_log_rule} objects | ||
* of {@see restore_log_rule} objects | ||
* | ||
* Note this rules are applied when restoring course logs | ||
* by the restore final task, but are defined here at | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This class is used to restore all settings | ||
* @package mod_ivs | ||
* @author Ghostthinker GmbH <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
|
@@ -27,33 +28,37 @@ | |
|
||
defined('MOODLE_INTERNAL') || die; | ||
|
||
/** | ||
* Class restore_match_answer_setting | ||
*/ | ||
class restore_match_answer_setting extends restore_activity_generic_setting { | ||
|
||
/** | ||
* Instantiates a setting object | ||
* restore_match_answer_setting constructor. | ||
* | ||
* @param string $name Name of the setting | ||
* @param string $vtype Type of the setting, eg {@link base_setting::IS_TEXT} | ||
* @param mixed $value Value of the setting | ||
* @param bool $visibility Is the setting visible in the UI, eg {@link base_setting::VISIBLE} | ||
* @param int $status Status of the setting with regards to the locking, eg {@link base_setting::NOT_LOCKED} | ||
* @param bool $visibility Is the setting visible in the UI, eg {@see base_setting::VISIBLE} | ||
* @param int $status Status of the setting with regards to the locking, eg {@see base_setting::NOT_LOCKED} | ||
*/ | ||
public function __construct($name, $value = null, $visibility = self::VISIBLE, $status = self::NOT_LOCKED) { | ||
parent::__construct($name, self::IS_TEXT, $value, $visibility, $status); | ||
$this->make_ui(self::UI_HTML_CHECKBOX, get_string("ivs_restore_include_match_answers", 'ivs'), null); | ||
} | ||
} | ||
|
||
/** | ||
* Class restore_videocomments_setting | ||
*/ | ||
class restore_videocomments_setting extends restore_activity_generic_setting { | ||
|
||
/** | ||
* Instantiates a setting object | ||
* restore_videocomments_setting constructor. | ||
* | ||
* @param string $name Name of the setting | ||
* @param string $vtype Type of the setting, eg {@link base_setting::IS_TEXT} | ||
* @param mixed $value Value of the setting | ||
* @param bool $visibility Is the setting visible in the UI, eg {@link base_setting::VISIBLE} | ||
* @param int $status Status of the setting with regards to the locking, eg {@link base_setting::NOT_LOCKED} | ||
* @param bool $visibility Is the setting visible in the UI, eg {@see base_setting::VISIBLE} | ||
* @param int $status Status of the setting with regards to the locking, eg {@see base_setting::NOT_LOCKED} | ||
*/ | ||
public function __construct($name, $value = null, $visibility = self::VISIBLE, $status = self::NOT_LOCKED) { | ||
parent::__construct($name, self::IS_TEXT, $value, $visibility, $status); | ||
|
Oops, something went wrong.