Skip to content

Commit

Permalink
New Feature: User Interface GH-30
Browse files Browse the repository at this point in the history
  • Loading branch information
WunderJacob committed Dec 14, 2023
1 parent 678b798 commit dae4dcf
Show file tree
Hide file tree
Showing 27 changed files with 1,184 additions and 91 deletions.
2 changes: 1 addition & 1 deletion amd/build/app-lazy.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/app-lazy.min.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions amd/src/app-lazy.js

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions classes/event/completion_criteria_updated.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?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/>.

/**
* Validate if the string does excist.
*
* @package local_adele
* @author Jacob Viertel
* @copyright 2023 Wunderbyte GmbH
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace local_adele\event;

use html_writer;
use moodle_url;

/**
* The learnpath created event class.
*
* @package local_adele
* @author Jacob Viertel
* @copyright 2023 Wunderbyte GmbH
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class completion_criteria_updated extends \core\event\base {

/**
* Init parameters.
*
* @return void
*
*/
protected function init() {
$this->data['crud'] = 'u'; // Meaning: c = create.
$this->data['edulevel'] = self::LEVEL_OTHER;
$this->data['objecttable'] = 'local_adele_learning_paths';
}

/**
* Get name.
*
* @return string
*
*/
public static function get_name() {
return get_string('event_completion_criteria_updated', 'local_adele');
}

/**
* Get description.
*
* @return string
*
*/
public function get_description() {
$data = $this->data;
//$contextnamelink = html_writer::link('local/adele/manage_learning_paths.php', $otherarray->contextname);
return get_string('event_completion_criteria_updated_description', 'local_adele', $data['other']['learningpathname']);
}

/**
* Get url.
*
* @return object
*
*/
public function get_url() {
return new moodle_url('');
}
}
84 changes: 84 additions & 0 deletions classes/event/learnpath_created.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?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/>.

/**
* Validate if the string does excist.
*
* @package local_adele
* @author Jacob Viertel
* @copyright 2023 Wunderbyte GmbH
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace local_adele\event;

use html_writer;
use moodle_url;

/**
* The learnpath created event class.
*
* @package local_adele
* @author Jacob Viertel
* @copyright 2023 Wunderbyte GmbH
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class learnpath_created extends \core\event\base {

/**
* Init parameters.
*
* @return void
*
*/
protected function init() {
$this->data['crud'] = 'c'; // Meaning: c = create.
$this->data['edulevel'] = self::LEVEL_OTHER;
$this->data['objecttable'] = 'local_adele_learning_paths';
}

/**
* Get name.
*
* @return string
*
*/
public static function get_name() {
return get_string('event_learnpath_created', 'local_adele');
}

/**
* Get description.
*
* @return string
*
*/
public function get_description() {
$data = $this->data;
//$contextnamelink = html_writer::link('local/adele/manage_learning_paths.php', $otherarray->contextname);
return get_string('event_learnpath_created_description', 'local_adele', $data['other']['learningpathname']);
}

/**
* Get url.
*
* @return object
*
*/
public function get_url() {
return new moodle_url('');
}
}
84 changes: 84 additions & 0 deletions classes/event/learnpath_deleted.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?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/>.

/**
* Validate if the string does excist.
*
* @package local_adele
* @author Jacob Viertel
* @copyright 2023 Wunderbyte GmbH
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace local_adele\event;

use html_writer;
use moodle_url;

/**
* The learnpath created event class.
*
* @package local_adele
* @author Jacob Viertel
* @copyright 2023 Wunderbyte GmbH
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class learnpath_deleted extends \core\event\base {

/**
* Init parameters.
*
* @return void
*
*/
protected function init() {
$this->data['crud'] = 'c'; // Meaning: c = create.
$this->data['edulevel'] = self::LEVEL_OTHER;
$this->data['objecttable'] = 'local_adele_learning_paths';
}

/**
* Get name.
*
* @return string
*
*/
public static function get_name() {
return get_string('event_learnpath_deleted', 'local_adele');
}

/**
* Get description.
*
* @return string
*
*/
public function get_description() {
$data = $this->data;
//$contextnamelink = html_writer::link('local/adele/manage_learning_paths.php', $otherarray->contextname);
return get_string('event_learnpath_deleted_description', 'local_adele', $data['other']['learningpathname']);
}

/**
* Get url.
*
* @return object
*
*/
public function get_url() {
return new moodle_url('');
}
}
84 changes: 84 additions & 0 deletions classes/event/learnpath_updated.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?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/>.

/**
* Validate if the string does excist.
*
* @package local_adele
* @author Jacob Viertel
* @copyright 2023 Wunderbyte GmbH
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace local_adele\event;

use html_writer;
use moodle_url;

/**
* The learnpath created event class.
*
* @package local_adele
* @author Jacob Viertel
* @copyright 2023 Wunderbyte GmbH
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class learnpath_updated extends \core\event\base {

/**
* Init parameters.
*
* @return void
*
*/
protected function init() {
$this->data['crud'] = 'c'; // Meaning: c = create.
$this->data['edulevel'] = self::LEVEL_OTHER;
$this->data['objecttable'] = 'local_adele_learning_paths';
}

/**
* Get name.
*
* @return string
*
*/
public static function get_name() {
return get_string('event_learnpath_updated', 'local_adele');
}

/**
* Get description.
*
* @return string
*
*/
public function get_description() {
$data = $this->data;
//$contextnamelink = html_writer::link('local/adele/manage_learning_paths.php', $otherarray->contextname);
return get_string('event_learnpath_updated_description', 'local_adele', $data['other']['learningpathname']);
}

/**
* Get url.
*
* @return object
*
*/
public function get_url() {
return new moodle_url('');
}
}
2 changes: 1 addition & 1 deletion classes/external/get_availablecourses.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static function execute($userid, $learninggoalid): array {
public static function execute_returns(): external_multiple_structure {
return new external_multiple_structure(
new external_single_structure([
'id' => new external_value(PARAM_INT, 'Item id'),
'course_node_id' => new external_value(PARAM_INT, 'Item id'),
'fullname' => new external_value(PARAM_TEXT, 'Historyid id'),
'shortname' => new external_value(PARAM_TEXT, 'Item name'),
'category' => new external_value(PARAM_TEXT, 'Category level'),
Expand Down
Loading

0 comments on commit dae4dcf

Please sign in to comment.