Browse Source

Fix phpdocs.

MOODLE_32_STABLE
Dan Marsden 7 years ago
parent
commit
8d8322229e
  1. 9
      classes/task/auto_mark.php
  2. 9
      classes/task/notify.php
  3. 3
      locallib.php
  4. 4
      password.php
  5. 4
      password_ajax.php
  6. 3
      renderables.php
  7. 2
      renderer.php

9
classes/task/auto_mark.php

@ -34,10 +34,19 @@ require_once($CFG->dirroot . '/mod/attendance/locallib.php');
* @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
*/ */
class auto_mark extends \core\task\scheduled_task { class auto_mark extends \core\task\scheduled_task {
/**
* Returns localised general event name.
*
* @return string
*/
public function get_name() { public function get_name() {
// Shown in admin screens. // Shown in admin screens.
return get_string('automarktask', 'mod_attendance'); return get_string('automarktask', 'mod_attendance');
} }
/**
* Execte the task.
*/
public function execute() { public function execute() {
global $DB; global $DB;
// Create some cache vars - might be nice to restructure this and make a smaller number of sql calls. // Create some cache vars - might be nice to restructure this and make a smaller number of sql calls.

9
classes/task/notify.php

@ -34,10 +34,19 @@ require_once($CFG->dirroot . '/mod/attendance/locallib.php');
* @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
*/ */
class notify extends \core\task\scheduled_task { class notify extends \core\task\scheduled_task {
/**
* Returns localised general event name.
*
* @return string
*/
public function get_name() { public function get_name() {
// Shown in admin screens. // Shown in admin screens.
return get_string('notifytask', 'mod_attendance'); return get_string('notifytask', 'mod_attendance');
} }
/**
* Execute the task.
*/
public function execute() { public function execute() {
global $DB; global $DB;
if (empty(get_config('attendance', 'enablewarnings'))) { if (empty(get_config('attendance', 'enablewarnings'))) {

3
locallib.php

@ -524,7 +524,7 @@ function attendance_exporttocsv($data, $filename) {
/** /**
* Get session data for form. * Get session data for form.
* @param stdClass $formdata moodleform - attendance form. * @param stdClass $formdata moodleform - attendance form.
* $param mod_attendance_structure $att - used to get attendance level subnet. * @param mod_attendance_structure $att - used to get attendance level subnet.
* @return array. * @return array.
*/ */
function attendance_construct_sessions_data_for_add($formdata, mod_attendance_structure $att) { function attendance_construct_sessions_data_for_add($formdata, mod_attendance_structure $att) {
@ -716,6 +716,7 @@ SELECT a.id, a.course as courseid, c.fullname as coursename, atl.studentid AS us
* Generates a list of users flagged absent. * Generates a list of users flagged absent.
* *
* @param array $courseids optional list of courses to return * @param array $courseids optional list of courses to return
* @param string $orderby how to order results.
* @param bool $allfornotify get notification list for scheduled task. * @param bool $allfornotify get notification list for scheduled task.
* @return stdClass * @return stdClass
*/ */

4
password.php

@ -20,8 +20,8 @@
* Use {@link core_renderer::help_icon()} or {@link addHelpButton()} to display * Use {@link core_renderer::help_icon()} or {@link addHelpButton()} to display
* the help icon. * the help icon.
* *
* @copyright 2002 onwards Martin Dougiamas * @copyright 2017 Dan Marsden
* @package core * @package mod_attendance
* @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
*/ */

4
password_ajax.php

@ -20,8 +20,8 @@
* Use {@link core_renderer::help_icon()} or {@link addHelpButton()} to display * Use {@link core_renderer::help_icon()} or {@link addHelpButton()} to display
* the help icon. * the help icon.
* *
* @copyright 2002 onwards Martin Dougiamas * @copyright 2017 Dan Marsden
* @package core * @package mod_attendance
* @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
*/ */
define('AJAX_SCRIPT', true); define('AJAX_SCRIPT', true);

3
renderables.php

@ -812,7 +812,6 @@ class url_helpers {
/** /**
* Data structure representing an attendance password icon. * Data structure representing an attendance password icon.
* copied from help_icon class
* *
* @copyright 2017 Dan Marsden * @copyright 2017 Dan Marsden
* @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
@ -835,7 +834,7 @@ class attendance_password_icon implements renderable, templatable {
* @param string $identifier string for help page title, * @param string $identifier string for help page title,
* string with _help suffix is used for the actual help text. * string with _help suffix is used for the actual help text.
* string with _link suffix is used to create a link to further info (if it exists) * string with _link suffix is used to create a link to further info (if it exists)
* @param string $component * @param string $sessionid
*/ */
public function __construct($text, $sessionid) { public function __construct($text, $sessionid) {
$this->text = $text; $this->text = $text;

2
renderer.php

@ -296,7 +296,7 @@ class mod_attendance_renderer extends plugin_renderer_base {
/** /**
* Implementation of user image rendering. * Implementation of user image rendering.
* *
* @param help_icon $helpicon A help icon instance * @param attendance_password_icon $helpicon A help icon instance
* @return string HTML fragment * @return string HTML fragment
*/ */
protected function render_attendance_password_icon(attendance_password_icon $helpicon) { protected function render_attendance_password_icon(attendance_password_icon $helpicon) {

Loading…
Cancel
Save