return $scale;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $instanceconfigs = !empty($this->config) ? $this->config : new stdClass();
+ $pluginconfigs = get_config('block_activity_results');
+
+ return (object) [
+ 'instance' => $instanceconfigs,
+ 'plugin' => $pluginconfigs,
+ ];
+ }
}
$this->content->text .= get_string('norecentblogentries', 'block_blog_recent');
}
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = !empty($this->config) ? $this->config : new stdClass();
+
+ return (object) [
+ 'instance' => $configs,
+ 'plugin' => new stdClass(),
+ ];
+ }
}
}
return $this->content;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = !empty($this->config) ? $this->config : new stdClass();
+
+ return (object) [
+ 'instance' => $configs,
+ 'plugin' => new stdClass(),
+ ];
+ }
}
function block_blog_tags_sort($a, $b) {
public function get_aria_role() {
return 'navigation';
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ global $CFG;
+
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = (object) [
+ 'adminview' => $CFG->block_course_list_adminview,
+ 'hideallcourseslink' => $CFG->block_course_list_hideallcourseslink
+ ];
+
+ return (object) [
+ 'instance' => new stdClass(),
+ 'plugin' => $configs,
+ ];
+ }
}
return $this->content;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = !empty($this->config) ? $this->config : new stdClass();
+
+ return (object) [
+ 'instance' => $configs,
+ 'plugin' => new stdClass(),
+ ];
+ }
}
return $attributes;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ global $CFG;
+
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $instanceconfigs = !empty($this->config) ? $this->config : new stdClass();
+ $pluginconfigs = (object) ['allowcssclasses' => $CFG->block_html_allowcssclasses];
+
+ return (object) [
+ 'instance' => $instanceconfigs,
+ 'plugin' => $pluginconfigs,
+ ];
+ }
}
public function instance_can_be_docked() {
return parent::instance_can_be_docked() && isset($this->config->title) && !empty($this->config->title);
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = !empty($this->config) ? $this->config : new stdClass();
+
+ return (object) [
+ 'instance' => $configs,
+ 'plugin' => new stdClass(),
+ ];
+ }
}
public function has_config() {
return true;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = get_config('block_myoverview');
+
+ return (object) [
+ 'instance' => new stdClass(),
+ 'plugin' => $configs,
+ ];
+ }
}
public function before_delete() {
}
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = !empty($this->config) ? $this->config : new stdClass();
+
+ return (object) [
+ 'instance' => $configs,
+ 'plugin' => new stdClass(),
+ ];
+ }
}
public function get_aria_role() {
return 'navigation';
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = !empty($this->config) ? $this->config : new stdClass();
+
+ return (object) [
+ 'instance' => $configs,
+ 'plugin' => new stdClass(),
+ ];
+ }
}
return $this->content;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ global $CFG;
+
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = (object) [
+ 'timetosee' => $CFG->block_online_users_timetosee,
+ 'onlinestatushiding' => $CFG->block_online_users_onlinestatushiding
+ ];
+
+ return (object) [
+ 'instance' => new stdClass(),
+ 'plugin' => $configs,
+ ];
+ }
}
public function has_config() {
return true;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = get_config('block_recentlyaccessedcourses');
+
+ return (object) [
+ 'instance' => new stdClass(),
+ 'plugin' => $configs,
+ ];
+ }
}
return core_text::substr($title, 0, $max - 3) . '...';
}
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ global $CFG;
+
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $instanceconfigs = !empty($this->config) ? $this->config : new stdClass();
+ $pluginconfigs = (object) [
+ 'num_entries' => $CFG->block_rss_client_num_entries,
+ 'timeout' => $CFG->block_rss_client_timeout
+ ];
+
+ return (object) [
+ 'instance' => $instanceconfigs,
+ 'plugin' => $pluginconfigs,
+ ];
+ }
}
public function has_config() {
return true;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $instanceconfigs = !empty($this->config) ? $this->config : new stdClass();
+ $pluginconfigs = get_config('block_section_links');
+
+ return (object) [
+ 'instance' => $instanceconfigs,
+ 'plugin' => $pluginconfigs,
+ ];
+ }
}
public function get_aria_role() {
return 'navigation';
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = !empty($this->config) ? $this->config : new stdClass();
+
+ return (object) [
+ 'instance' => $configs,
+ 'plugin' => new stdClass(),
+ ];
+ }
}
public function has_config() {
return true;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = get_config('block_starredcourses');
+
+ return (object) [
+ 'instance' => new stdClass(),
+ 'plugin' => $configs,
+ ];
+ }
}
}
return $url;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = !empty($this->config) ? $this->config : new stdClass();
+
+ return (object) [
+ 'instance' => $configs,
+ 'plugin' => new stdClass(),
+ ];
+ }
}
return $oldcat;
}
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // There is a private key, only admins can see it.
+ $pluginconfigs = get_config('block_tag_youtube');
+ if (!has_capability('moodle/site:config', context_system::instance())) {
+ unset($pluginconfigs->apikey);
+ }
+ $instanceconfigs = !empty($this->config) ? $this->config : new stdClass();
+
+ return (object) [
+ 'instance' => $instanceconfigs,
+ 'plugin' => $pluginconfigs,
+ ];
+ }
}
return $this->content;
}
+
+ /**
+ * Return the plugin config settings for external functions.
+ *
+ * @return stdClass the configs for both the block instance and plugin
+ * @since Moodle 3.8
+ */
+ public function get_config_for_external() {
+ // Return all settings for all users since it is safe (no private keys, etc..).
+ $configs = !empty($this->config) ? $this->config : new stdClass();
+
+ return (object) [
+ 'instance' => $configs,
+ 'plugin' => new stdClass(),
+ ];
+ }
}