-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from rlorenzo/updated-logging_28dev
Converting add_to_log to new logging system for Moodle 2.7+
- Loading branch information
Showing
16 changed files
with
485 additions
and
4 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
mod/kalvidassign/classes/event/assignment_details_viewed.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?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/>. | ||
|
||
/** | ||
* The assignment_details_viewed event. | ||
* | ||
* @package mod | ||
* @subpackage kalvidassign | ||
* @copyright 2015 Rex Lorenzo <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace mod_kalvidassign\event; | ||
defined('MOODLE_INTERNAL') || die(); | ||
/** | ||
* The assignment_details_viewed event class. | ||
* | ||
* | ||
* @since Moodle 2.7 | ||
* @copyright 2015 Rex Lorenzo <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
**/ | ||
class assignment_details_viewed extends \core\event\base { | ||
protected function init() { | ||
$this->data['crud'] = 'r'; // c(reate), r(ead), u(pdate), d(elete) | ||
$this->data['edulevel'] = self::LEVEL_PARTICIPATING; | ||
$this->data['objecttable'] = 'kalvidassign'; | ||
} | ||
|
||
public static function get_name() { | ||
return get_string('eventassignment_details_viewed', 'kalvidassign'); | ||
} | ||
|
||
public function get_description() { | ||
return "The user with id '{$this->userid}' viewed the details" | ||
. " of the Kaltura media assignment with the course module id of '{$this->contextinstanceid}'."; | ||
} | ||
|
||
public function get_url() { | ||
return new \moodle_url('view.php', array('cmid' => $this->contextinstanceid)); | ||
} | ||
|
||
public function get_legacy_logdata() { | ||
return array($this->courseid, 'kalvidassign', 'view assignment details', | ||
$this->get_url(), $this->objectid, $this->contextinstanceid); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?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/>. | ||
|
||
/** | ||
* The assignment_submitted event. | ||
* | ||
* @package mod | ||
* @subpackage kalvidassign | ||
* @copyright 2015 Rex Lorenzo <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace mod_kalvidassign\event; | ||
defined('MOODLE_INTERNAL') || die(); | ||
/** | ||
* The assignment_submitted event class. | ||
* | ||
* | ||
* @since Moodle 2.7 | ||
* @copyright 2015 Rex Lorenzo <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
**/ | ||
class assignment_submitted extends \core\event\base { | ||
protected function init() { | ||
$this->data['crud'] = 'u'; // c(reate), r(ead), u(pdate), d(elete) | ||
$this->data['edulevel'] = self::LEVEL_PARTICIPATING; | ||
$this->data['objecttable'] = 'kalvidassign_submission'; | ||
} | ||
|
||
public static function get_name() { | ||
return get_string('eventassignment_submitted', 'kalvidassign'); | ||
} | ||
|
||
public function get_description() { | ||
return "The user with id '{$this->userid}' made a submission to the Kaltura media" | ||
. " assignment with the course module id of '{$this->contextinstanceid}'."; | ||
} | ||
|
||
public function get_url() { | ||
return new \moodle_url('view.php', array('cmid' => $this->contextinstanceid)); | ||
} | ||
|
||
public function get_legacy_logdata() { | ||
return array($this->courseid, 'kalvidassign', 'submit', | ||
$this->get_url(), $this->objectid, $this->contextinstanceid); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
mod/kalvidassign/classes/event/grade_submissions_page_viewed.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?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/>. | ||
|
||
/** | ||
* The grade_submissions_page_viewed event. | ||
* | ||
* @package mod | ||
* @subpackage kalvidassign | ||
* @copyright 2015 Rex Lorenzo <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace mod_kalvidassign\event; | ||
defined('MOODLE_INTERNAL') || die(); | ||
/** | ||
* The grade_submissions_page_viewed event class. | ||
* | ||
* | ||
* @since Moodle 2.7 | ||
* @copyright 2015 Rex Lorenzo <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
**/ | ||
class grade_submissions_page_viewed extends \core\event\base { | ||
protected function init() { | ||
$this->data['crud'] = 'r'; // c(reate), r(ead), u(pdate), d(elete) | ||
$this->data['edulevel'] = self::LEVEL_TEACHING; | ||
$this->data['objecttable'] = 'kalvidassign'; | ||
} | ||
|
||
public static function get_name() { | ||
return get_string('eventgrade_submissions_page_viewed', 'kalvidassign'); | ||
} | ||
|
||
public function get_description() { | ||
return "The user with id '{$this->userid}' viewed the grade submissions page for " | ||
. "the Kaltura media assignment with the course module id '{$this->contextinstanceid}'."; | ||
} | ||
|
||
public function get_url() { | ||
return new \moodle_url('grade_submissions.php', array('cmid' => $this->contextinstanceid)); | ||
} | ||
|
||
public function get_legacy_logdata() { | ||
return array($this->courseid, 'kalvidassign', 'view submissions page', | ||
$this->get_url(), $this->objectid, $this->contextinstanceid); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?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/>. | ||
|
||
/** | ||
* The grades_updated event. | ||
* | ||
* @package mod | ||
* @subpackage kalvidassign | ||
* @copyright 2015 Rex Lorenzo <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace mod_kalvidassign\event; | ||
defined('MOODLE_INTERNAL') || die(); | ||
/** | ||
* The grades_updated event class. | ||
* | ||
* @property-read array $other { | ||
* 'crud' => string 'c', 'r', 'u', or 'd', depending on context the event is triggered in | ||
* } | ||
* | ||
* @since Moodle 2.7 | ||
* @copyright 2015 Rex Lorenzo <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
**/ | ||
class grades_updated extends \core\event\base { | ||
protected function init() { | ||
$this->data['crud'] = 'u'; // c(reate), r(ead), u(pdate), d(elete) | ||
$this->data['edulevel'] = self::LEVEL_TEACHING; | ||
} | ||
|
||
public static function get_name() { | ||
return get_string('eventgrades_updated', 'kalvidassign'); | ||
} | ||
|
||
public function get_description() { | ||
return "The user with id '{$this->userid}' updated the grades" | ||
. " for the Kaltura media assignment with the course module id of '{$this->contextinstanceid}'."; | ||
} | ||
|
||
public function get_url() { | ||
return new \moodle_url('grade_submissions.php', array('cmid' => $this->contextinstanceid)); | ||
} | ||
|
||
public function get_legacy_logdata() { | ||
return array($this->courseid, 'kalvidassign', 'update grades', | ||
$this->get_url(), $this->contextinstanceid); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
mod/kalvidassign/classes/event/single_submission_page_viewed.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?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/>. | ||
|
||
/** | ||
* The single_submission_page_viewed event. | ||
* | ||
* @package mod | ||
* @subpackage kalvidassign | ||
* @copyright 2015 Rex Lorenzo <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
namespace mod_kalvidassign\event; | ||
defined('MOODLE_INTERNAL') || die(); | ||
/** | ||
* The single_submission_page_viewed event class. | ||
* | ||
* | ||
* @since Moodle 2.7 | ||
* @copyright 2015 Rex Lorenzo <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
**/ | ||
class single_submission_page_viewed extends \core\event\base { | ||
protected function init() { | ||
$this->data['crud'] = 'r'; // c(reate), r(ead), u(pdate), d(elete) | ||
$this->data['edulevel'] = self::LEVEL_TEACHING; | ||
$this->data['objecttable'] = 'kalvidassign_submission'; | ||
} | ||
|
||
public static function get_name() { | ||
return get_string('eventsingle_submission_page_viewed', 'kalvidassign'); | ||
} | ||
|
||
public function get_description() { | ||
return "The user with id '{$this->userid}' viewed the submission with id '{$this->objectid}'" | ||
. " for the Kaltura media assignment with the course module id of '{$this->contextinstanceid}'."; | ||
} | ||
|
||
public function get_url() { | ||
return new \moodle_url('single_submission.php', array('cmid' => $this->contextinstanceid)); | ||
} | ||
|
||
public function get_legacy_logdata() { | ||
return array($this->courseid, 'kalvidassign', 'view submission page', | ||
$this->get_url(), $this->objectid, $this->contextinstanceid); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.