forked from moodle/moodle
-
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.
Merge branch 'UCSFCLE_404_STABLE' into UCSFCLE_404-Add_danmarsden/moo…
…dle-block_attendance_to_blocks/attendance_as_a_git_submodule
- Loading branch information
Showing
200 changed files
with
58,544 additions
and
1 deletion.
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
Submodule course_recent
added at
d66498
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
class block_kalturamediagallery extends block_base { | ||
function init() { | ||
$this->title = get_string('pluginname', 'local_kalturamediagallery'); | ||
} | ||
|
||
function get_content() { | ||
if(!is_null($this->content)) { | ||
return $this->content; | ||
} | ||
|
||
$this->content = new stdClass(); | ||
$this->content->text = ''; | ||
$this->content->footer = ''; | ||
|
||
if($context = $this->getCourseContext()) { | ||
$this->content->text = $this->getKalturaMediaGalleryLink($context->instanceid); | ||
} | ||
|
||
return $this->content; | ||
} | ||
|
||
function applicable_formats() | ||
{ | ||
return array( | ||
'course-view' => true | ||
); | ||
} | ||
|
||
private function getKalturaMediaGalleryLink($courseId) { | ||
$mediaGalleryUrl = new moodle_url('/local/kalturamediagallery/index.php', array( | ||
'courseid' => $courseId | ||
)); | ||
|
||
$link = html_writer::tag('a', get_string('nav_mediagallery', 'local_kalturamediagallery'), array( | ||
'href' => $mediaGalleryUrl->out(false) | ||
)); | ||
|
||
return $link; | ||
} | ||
|
||
private function getCourseContext() { | ||
// Check the current page context. If the context is not of a course or module then return false. | ||
$context = context::instance_by_id($this->page->context->id); | ||
$isCourseContext = $context instanceof context_course; | ||
if (!$isCourseContext) { | ||
return false; | ||
} | ||
|
||
// If the context if a module then get the parent context. | ||
$courseContext = ($context instanceof context_module) ? $context->get_course_context() : $context; | ||
|
||
return $courseContext; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace block_kalturamediagallery\privacy; | ||
|
||
use \core_privacy\local\metadata\null_provider; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
class provider implements null_provider { | ||
|
||
/** | ||
* Get the language string identifier with the component's language | ||
* file to explain why this plugin stores no data. | ||
* | ||
* @return string | ||
*/ | ||
public static function get_reason() : string { | ||
return 'privacy:metadata'; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?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/>. | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
$capabilities = array( | ||
'block/kalturamediagallery:myaddinstance' => array( | ||
'captype' => 'write', | ||
'contextlevel' => CONTEXT_SYSTEM, | ||
'archetypes' => array( | ||
'user' => CAP_PROHIBIT | ||
), | ||
|
||
'clonepermissionsfrom' => 'moodle/my:manageblocks' | ||
), | ||
|
||
'block/kalturamediagallery:addinstance' => array( | ||
'riskbitmask' => RISK_SPAM | RISK_XSS, | ||
'captype' => 'write', | ||
'contextlevel' => CONTEXT_BLOCK, | ||
'archetypes' => array( | ||
'editingteacher' => CAP_ALLOW, | ||
'manager' => CAP_ALLOW | ||
), | ||
|
||
'clonepermissionsfrom' => 'moodle/site:manageblocks' | ||
), | ||
); |
20 changes: 20 additions & 0 deletions
20
blocks/kalturamediagallery/lang/en/block_kalturamediagallery.php
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?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/>. | ||
|
||
$string['pluginname'] = 'Kaltura Media Gallery'; | ||
$string['kalturamediagallery:addinstance'] = 'Add a new Kaltura Media Gallery block'; | ||
$string['kalturamediagallery:myaddinstance'] = 'Add a new Kaltura Media Gallery block to Dashboard'; | ||
$string['privacy:metadata'] = 'The Kaltura Media Gallery block only displays a link to Kaltura Media Gallery local plugin'; |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
// 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/>. | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
$plugin->version = 2024042201; | ||
$plugin->release = 'Kaltura release 4.4.9'; | ||
$plugin->requires = 2024042200; | ||
$plugin->component = 'block_kalturamediagallery'; | ||
$plugin->dependencies = array( | ||
'local_kaltura' => 2024042201, | ||
'local_kalturamediagallery' => 2024042201 | ||
); |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
BRANCH=`git branch | grep '*' |awk -F _ '{print $2}'` | ||
VER=`cat local/kaltura/version.php |grep '>version' | awk '{print $3}' | awk -F ";" '{print $1}'` | ||
|
||
echo "Generating package for Kaltura_Video_Package_moodle"$BRANCH"_"$VER".zip\n" | ||
|
||
FILENAME="Kaltura_Video_Package_moodle"$BRANCH"_"$VER".zip" | ||
|
||
zip -r $FILENAME lib filter mod local blocks |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace filter_kaltura\privacy; | ||
|
||
use \core_privacy\local\metadata\null_provider; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
class provider implements null_provider { | ||
|
||
/** | ||
* Get the language string identifier with the component's language | ||
* file to explain why this plugin stores no data. | ||
* | ||
* @return string | ||
*/ | ||
public static function get_reason() : string { | ||
return 'privacy:metadata'; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?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/>. | ||
|
||
/** | ||
* Filter post install hook | ||
* | ||
* @package filter_kaltura | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
function xmldb_filter_kaltura_install() { | ||
global $CFG; | ||
require_once("$CFG->libdir/filterlib.php"); | ||
|
||
// Do not enable the filter when running unit tests because some core | ||
// tests expect a specific number of filters enabled. | ||
if (!defined('PHPUNIT_TEST') || !PHPUNIT_TEST) { | ||
filter_set_global_state('kaltura', TEXTFILTER_ON); | ||
} | ||
|
||
} |
Oops, something went wrong.