Skip to content
Snippets Groups Projects
Unverified Commit f489b525 authored by Tobias Reischmann's avatar Tobias Reischmann
Browse files

Fixed paths and namespaces

parent e77dc90f
No related branches found
No related tags found
No related merge requests found
Showing
with 42 additions and 30 deletions
...@@ -28,7 +28,7 @@ require_login(); ...@@ -28,7 +28,7 @@ require_login();
$PAGE->set_context(context_system::instance()); $PAGE->set_context(context_system::instance());
$PAGE->set_url(new \moodle_url('/admin/tool/cleanupcourses/activeprocesses.php')); $PAGE->set_url(new \moodle_url('/admin/tool/cleanupcourses/activeprocesses.php'));
$table = new tool_cleanupcourses\active_processes_table('tool_cleanupcourses_active_processes'); $table = new tool_cleanupcourses\table\active_processes_table('tool_cleanupcourses_active_processes');
$PAGE->set_title("Title"); $PAGE->set_title("Title");
$PAGE->set_heading("Heading"); $PAGE->set_heading("Heading");
......
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
namespace tool_cleanupcourses; namespace tool_cleanupcourses;
use tool_cleanupcourses\manager\step_manager;
use tool_cleanupcourses\manager\trigger_manager;
use tool_cleanupcourses\table\step_table;
use tool_cleanupcourses\table\trigger_table;
defined('MOODLE_INTERNAL') || die; defined('MOODLE_INTERNAL') || die;
require_once($CFG->libdir . '/adminlib.php'); require_once($CFG->libdir . '/adminlib.php');
......
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
namespace tool_cleanupcourses; namespace tool_cleanupcourses\manager;
use tool_cleanupcourses\object\step_subplugin;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
namespace tool_cleanupcourses; namespace tool_cleanupcourses\manager;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
namespace tool_cleanupcourses; namespace tool_cleanupcourses\manager;
use tool_cleanupcourses\object\trigger_subplugin;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace tool_cleanupcourses; namespace tool_cleanupcourses\object;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace tool_cleanupcourses; namespace tool_cleanupcourses\object;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace tool_cleanupcourses; namespace tool_cleanupcourses\object;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
namespace tool_cleanupcourses; namespace tool_cleanupcourses\response;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
namespace tool_cleanupcourses; namespace tool_cleanupcourses\response;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
class trigger_respone { class trigger_response {
const NEXT = 'next'; const NEXT = 'next';
const EXCLUDE = 'exclude'; const EXCLUDE = 'exclude';
...@@ -44,26 +44,26 @@ class trigger_respone { ...@@ -44,26 +44,26 @@ class trigger_respone {
/** /**
* Creates a TriggerResponse telling that the subplugin does not want to process the course. * Creates a TriggerResponse telling that the subplugin does not want to process the course.
* This means that the course can be passed to the next trigger. * This means that the course can be passed to the next trigger.
* @return trigger_respone * @return trigger_response
*/ */
public static function next() { public static function next() {
return new trigger_respone(self::NEXT); return new trigger_response(self::NEXT);
} }
/** /**
* Creates a TriggerResponse telling that the subplugin wants to exlude the course from cleanup. * Creates a TriggerResponse telling that the subplugin wants to exlude the course from cleanup.
* @return trigger_respone * @return trigger_response
*/ */
public static function exclude() { public static function exclude() {
return new trigger_respone(self::EXCLUDE); return new trigger_response(self::EXCLUDE);
} }
/** /**
* Creates a TriggerResponse telling that the subplugin wants to trigger the cleanup process for the course. * Creates a TriggerResponse telling that the subplugin wants to trigger the cleanup process for the course.
* @return trigger_respone * @return trigger_response
*/ */
public static function trigger() { public static function trigger() {
return new trigger_respone(self::TRIGGER); return new trigger_response(self::TRIGGER);
} }
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
namespace tool_cleanupcourses; namespace tool_cleanupcourses\table;
defined('MOODLE_INTERNAL') || die; defined('MOODLE_INTERNAL') || die;
......
...@@ -21,12 +21,14 @@ ...@@ -21,12 +21,14 @@
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
namespace tool_cleanupcourses; namespace tool_cleanupcourses\table;
use tool_cleanupcourses\manager\step_manager;
defined('MOODLE_INTERNAL') || die; defined('MOODLE_INTERNAL') || die;
require_once($CFG->libdir . '/tablelib.php'); require_once($CFG->libdir . '/tablelib.php');
require_once(__DIR__ . '/../lib.php'); require_once(__DIR__ . '/../../lib.php');
class step_table extends \table_sql { class step_table extends \table_sql {
......
...@@ -21,12 +21,15 @@ ...@@ -21,12 +21,15 @@
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
namespace tool_cleanupcourses; namespace tool_cleanupcourses\table;
use tool_cleanupcourses\manager\step_manager;
use tool_cleanupcourses\manager\trigger_manager;
defined('MOODLE_INTERNAL') || die; defined('MOODLE_INTERNAL') || die;
require_once($CFG->libdir . '/tablelib.php'); require_once($CFG->libdir . '/tablelib.php');
require_once(__DIR__ . '/../lib.php'); require_once(__DIR__ . '/../../lib.php');
class trigger_table extends \table_sql { class trigger_table extends \table_sql {
......
...@@ -25,12 +25,11 @@ ...@@ -25,12 +25,11 @@
*/ */
namespace tool_cleanupcourses\step; namespace tool_cleanupcourses\step;
use tool_cleanupcourses\step_response; use tool_cleanupcourses\response\step_response;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/../lib.php'); require_once(__DIR__ . '/../lib.php');
require_once(__DIR__ . '/../../classes/step_response.php');
class dummy implements base { class dummy implements base {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
*/ */
namespace tool_cleanupcourses\step; namespace tool_cleanupcourses\step;
use tool_cleanupcourses\step_response; use tool_cleanupcourses\response\step_response;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
...@@ -19,7 +19,7 @@ defined('MOODLE_INTERNAL') || die(); ...@@ -19,7 +19,7 @@ defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/generator/lib.php'); require_once(__DIR__ . '/generator/lib.php');
require_once(__DIR__ . '/../lib.php'); require_once(__DIR__ . '/../lib.php');
use \tool_cleanupcourses\trigger_manager; use \tool_cleanupcourses\manager\trigger_manager;
/** /**
* Tests the different state changes of the subplugin_settings. * Tests the different state changes of the subplugin_settings.
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
use tool_cleanupcourses\trigger_manager; use tool_cleanupcourses\manager\trigger_manager;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
use tool_cleanupcourses\trigger_manager; use tool_cleanupcourses\manager\trigger_manager;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
...@@ -25,11 +25,10 @@ ...@@ -25,11 +25,10 @@
*/ */
namespace tool_cleanupcourses\trigger; namespace tool_cleanupcourses\trigger;
use tool_cleanupcourses\trigger_respone; use tool_cleanupcourses\response\trigger_respone;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/../lib.php'); require_once(__DIR__ . '/../lib.php');
require_once(__DIR__ . '/../../classes/trigger_response.php');
/** /**
* Class which implements the basic methods necessary for a cleanyp courses trigger subplugin * Class which implements the basic methods necessary for a cleanyp courses trigger subplugin
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
*/ */
namespace tool_cleanupcourses\trigger; namespace tool_cleanupcourses\trigger;
use tool_cleanupcourses\trigger_respone; use tool_cleanupcourses\response\trigger_respone;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment