MDL-73397 adminpresets: Remove tree-view
This commit is contained in:
@@ -1,12 +1,3 @@
|
||||
.admin_presets_tree_name {
|
||||
padding: 0 0 4px 2px;
|
||||
}
|
||||
|
||||
.admin_presets_tree_value {
|
||||
border: 1px solid #ccc;
|
||||
padding: 0 0 4px 2px;
|
||||
}
|
||||
|
||||
.admin_presets_error {
|
||||
color: red;
|
||||
text-align: center;
|
||||
|
||||
@@ -54,13 +54,6 @@ class adminpresets_setting {
|
||||
*/
|
||||
protected $visiblevalue;
|
||||
|
||||
/**
|
||||
* Text to display on the TreeView
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $text;
|
||||
|
||||
/**
|
||||
* For multiple value settings, used to look for the other values
|
||||
*
|
||||
@@ -173,24 +166,6 @@ class adminpresets_setting {
|
||||
return $encoded;
|
||||
}
|
||||
|
||||
public function get_text() {
|
||||
return $this->encode_string($this->text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the text to display on the settings tree
|
||||
*
|
||||
* Default format: I'm a setting visible name (setting value: "VALUE")
|
||||
*/
|
||||
public function set_text() {
|
||||
$this->set_visiblevalue();
|
||||
|
||||
$namediv = '<div class="admin_presets_tree_name">' . $this->settingdata->visiblename . '</div>';
|
||||
$valuediv = '<div class="admin_presets_tree_value">' . $this->visiblevalue . '</div>';
|
||||
|
||||
$this->text = $namediv . $valuediv . '<br/>';
|
||||
}
|
||||
|
||||
public function get_attributes() {
|
||||
return $this->attributes;
|
||||
}
|
||||
|
||||
@@ -279,9 +279,6 @@ class manager {
|
||||
}
|
||||
}
|
||||
|
||||
// Setting the text.
|
||||
$setting->set_text();
|
||||
|
||||
// Adding to general settings array.
|
||||
$settings[$values->plugin][$settingname] = $setting;
|
||||
}
|
||||
@@ -831,7 +828,6 @@ class manager {
|
||||
if (!empty($sitesettings[$change->plugin][$change->name])) {
|
||||
$actualsetting = $sitesettings[$change->plugin][$change->name];
|
||||
$oldsetting = $this->get_setting($actualsetting->get_settingdata(), $change->oldvalue);
|
||||
$oldsetting->set_text();
|
||||
|
||||
$visiblepluginname = $oldsetting->get_settingdata()->plugin;
|
||||
if ($visiblepluginname == 'none') {
|
||||
@@ -884,7 +880,6 @@ class manager {
|
||||
|
||||
$oldsetting = $this->get_setting($actualsetting->get_settingdata(), $actualsetting->get_value());
|
||||
$oldsetting->set_attribute_value($change->name, $change->oldvalue);
|
||||
$oldsetting->set_text();
|
||||
|
||||
$varname = $change->plugin . '_' . $change->name;
|
||||
|
||||
|
||||
@@ -29,21 +29,6 @@ use core_adminpresets\local\setting\adminpresets_setting;
|
||||
*/
|
||||
class adminpresets_mod_quiz_admin_review_setting extends adminpresets_setting {
|
||||
|
||||
/**
|
||||
* Overwrite to add the reviewoptions text
|
||||
*/
|
||||
public function set_text() {
|
||||
|
||||
$this->set_visiblevalue();
|
||||
|
||||
$name = get_string('reviewoptionsheading', 'quiz') .
|
||||
': ' . $this->settingdata->visiblename;
|
||||
$namediv = '<div class="admin_presets_tree_name">' . $name . '</div>';
|
||||
$valuediv = '<div class="admin_presets_tree_value">' . $this->visiblevalue . '</div>';
|
||||
|
||||
$this->text = $namediv . $valuediv . '<br/>';
|
||||
}
|
||||
|
||||
/**
|
||||
* The setting value is a sum of 'mod_quiz_admin_review_setting::times'
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user