mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-69060 core_contentbank: fix contenbank typos.
This commit is contained in:
parent
500c131eb4
commit
8b43f32f8c
5 changed files with 8 additions and 8 deletions
|
@ -645,14 +645,14 @@ if ($hassiteconfig) {
|
||||||
|
|
||||||
// Content bank content types.
|
// Content bank content types.
|
||||||
if ($hassiteconfig) {
|
if ($hassiteconfig) {
|
||||||
$ADMIN->add('modules', new admin_category('contenbanksettings', new lang_string('contentbank')));
|
$ADMIN->add('modules', new admin_category('contentbanksettings', new lang_string('contentbank')));
|
||||||
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
|
$temp = new admin_settingpage('managecontentbanktypes', new lang_string('managecontentbanktypes'));
|
||||||
$temp->add(new admin_setting_managecontentbankcontenttypes());
|
$temp->add(new admin_setting_managecontentbankcontenttypes());
|
||||||
$ADMIN->add('contenbanksettings', $temp);
|
$ADMIN->add('contentbanksettings', $temp);
|
||||||
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
|
$plugins = core_plugin_manager::instance()->get_plugins_of_type('contenttype');
|
||||||
foreach ($plugins as $plugin) {
|
foreach ($plugins as $plugin) {
|
||||||
/** @var \core\plugininfo\contentbank $plugin */
|
/** @var \core\plugininfo\contentbank $plugin */
|
||||||
$plugin->load_settings($ADMIN, 'contenbanksettings', $hassiteconfig);
|
$plugin->load_settings($ADMIN, 'contentbanksettings', $hassiteconfig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ abstract class content {
|
||||||
if (!class_exists($typeclass)) {
|
if (!class_exists($typeclass)) {
|
||||||
throw new coding_exception(get_string('contenttypenotfound', 'error', $record->contenttype));
|
throw new coding_exception(get_string('contenttypenotfound', 'error', $record->contenttype));
|
||||||
}
|
}
|
||||||
// A record with the id must exist in 'contenbank_content' table.
|
// A record with the id must exist in 'contentbank_content' table.
|
||||||
// To improve performance, we are only checking the id is set, but no querying the database.
|
// To improve performance, we are only checking the id is set, but no querying the database.
|
||||||
if (!isset($record->id)) {
|
if (!isset($record->id)) {
|
||||||
throw new coding_exception(get_string('invalidcontentid', 'error'));
|
throw new coding_exception(get_string('invalidcontentid', 'error'));
|
||||||
|
@ -103,7 +103,7 @@ abstract class content {
|
||||||
public function update_content(): bool {
|
public function update_content(): bool {
|
||||||
global $USER, $DB;
|
global $USER, $DB;
|
||||||
|
|
||||||
// A record with the id must exist in 'contenbank_content' table.
|
// A record with the id must exist in 'contentbank_content' table.
|
||||||
// To improve performance, we are only checking the id is set, but no querying the database.
|
// To improve performance, we are only checking the id is set, but no querying the database.
|
||||||
if (!isset($this->content->id)) {
|
if (!isset($this->content->id)) {
|
||||||
throw new coding_exception(get_string('invalidcontentid', 'error'));
|
throw new coding_exception(get_string('invalidcontentid', 'error'));
|
||||||
|
|
|
@ -44,7 +44,7 @@ $PAGE->set_url('/contentbank/index.php');
|
||||||
$PAGE->set_context($context);
|
$PAGE->set_context($context);
|
||||||
$PAGE->set_title($title);
|
$PAGE->set_title($title);
|
||||||
$PAGE->set_heading($title);
|
$PAGE->set_heading($title);
|
||||||
$PAGE->set_pagetype('contenbank');
|
$PAGE->set_pagetype('contentbank');
|
||||||
|
|
||||||
// Get all contents managed by active plugins where the user has permission to render them.
|
// Get all contents managed by active plugins where the user has permission to render them.
|
||||||
$cb = new \core_contentbank\contentbank();
|
$cb = new \core_contentbank\contentbank();
|
||||||
|
|
|
@ -44,7 +44,7 @@ $PAGE->set_context($context);
|
||||||
$PAGE->navbar->add(get_string('upload', 'contentbank'));
|
$PAGE->navbar->add(get_string('upload', 'contentbank'));
|
||||||
$PAGE->set_title($title);
|
$PAGE->set_title($title);
|
||||||
$PAGE->set_heading($title);
|
$PAGE->set_heading($title);
|
||||||
$PAGE->set_pagetype('contenbank');
|
$PAGE->set_pagetype('contentbank');
|
||||||
|
|
||||||
$maxbytes = $CFG->userquota;
|
$maxbytes = $CFG->userquota;
|
||||||
$maxareabytes = $CFG->userquota;
|
$maxareabytes = $CFG->userquota;
|
||||||
|
|
|
@ -56,7 +56,7 @@ $PAGE->navbar->add($record->name);
|
||||||
$PAGE->set_heading($record->name);
|
$PAGE->set_heading($record->name);
|
||||||
$title .= ": ".$record->name;
|
$title .= ": ".$record->name;
|
||||||
$PAGE->set_title($title);
|
$PAGE->set_title($title);
|
||||||
$PAGE->set_pagetype('contenbank');
|
$PAGE->set_pagetype('contentbank');
|
||||||
|
|
||||||
$contenttypeclass = "\\$record->contenttype\\contenttype";
|
$contenttypeclass = "\\$record->contenttype\\contenttype";
|
||||||
$contentclass = "\\$record->contenttype\\content";
|
$contentclass = "\\$record->contenttype\\content";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue