This commit is contained in:
PMKuipers 2023-08-27 08:53:37 +02:00
parent 1532a0d233
commit d043d3c465
8 changed files with 29 additions and 9 deletions

View File

@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
/**
* Main block code
*
* @package block_mytreestudyplan
* @copyright 2023 P.M. Kuipers
@ -22,13 +23,20 @@
use local_treestudyplan\studyplan;
/**
* MyTreestudyplan block base code
*/
class block_mytreestudyplan extends \block_base {
public $levelset;
/**
* Plugin initialization (before $this->config and $this->page are loaded)
*/
public function init() {
}
/**
* Plugin specialization (directly called after $this->config and $this->page are ready)
*/
public function specialization() {
global $CFG;
$this->title = get_string('title', 'block_mytreestudyplan');
@ -51,6 +59,9 @@ class block_mytreestudyplan extends \block_base {
}
}
/**
* Publish the pages this block can be shown on
*/
public function applicable_formats() {
// Limit this block to the site index and the dashboard (my) pages.
return [
@ -62,6 +73,9 @@ class block_mytreestudyplan extends \block_base {
];
}
/**
* Render block content
*/
public function get_content() {
global $CFG;
global $USER;
@ -98,10 +112,16 @@ class block_mytreestudyplan extends \block_base {
return $this->content;
}
/**
* Whether to hide the header or not
*/
public function hide_header() {
return false;
}
/**
* Whether this block has config or not
*/
public function has_config() {
return false;
}

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
/**
*
* Build script to properly create a distribution zip
* @package block_mytreestudyplan
* @copyright 2023 P.M. Kuipers
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
/**
*
* Permission descriptions
* @package block_mytreestudyplan
* @copyright 2023 P.M. Kuipers
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
/**
*
* English language file
* @package block_mytreestudyplan
* @copyright 2023 P.M. Kuipers
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
/**
*
* Dutch language file
* @package block_mytreestudyplan
* @copyright 2023 P.M. Kuipers
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
/**
*
* Library page
* @package block_mytreestudyplan
* @copyright 2023 P.M. Kuipers
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
/**
*
* Settings page
* @package block_mytreestudyplan
* @copyright 2023 P.M. Kuipers
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <https://www.gnu.org/licenses/>.
/**
*
* Version description
* @package block_mytreestudyplan
* @copyright 2023 P.M. Kuipers
* @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later