Browse Source

Coding guideline fixes

MOODLE_23_STABLE
Dan Marsden 12 years ago
parent
commit
a68be60db2
  1. 14
      add_form.php
  2. 8
      duration_form.php
  3. 5
      export.php
  4. 8
      export_form.php
  5. 9
      index.php
  6. 8
      lib.php
  7. 8
      locallib.php
  8. 5
      manage.php
  9. 8
      mod_form.php
  10. 5
      preferences.php
  11. 4
      renderables.php
  12. 4
      renderer.php
  13. 4
      renderhelpers.php
  14. 5
      report.php
  15. 5
      sessions.php
  16. 8
      take.php
  17. 9
      update_form.php
  18. 7
      version.php
  19. 4
      view.php

14
add_form.php

@ -14,11 +14,19 @@
// 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/>.
/**
* This file contains the forms to add
*
* @package mod_attendance
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->libdir.'/formslib.php'); require_once($CFG->libdir.'/formslib.php');
class mod_attforblock_add_form extends moodleform { class mod_attforblock_add_form extends moodleform {
function definition() { public function definition() {
global $CFG, $USER; global $CFG, $USER;
$mform =& $this->_form; $mform =& $this->_form;
@ -27,9 +35,7 @@ class mod_attforblock_add_form extends moodleform {
$cm = $this->_customdata['cm']; $cm = $this->_customdata['cm'];
$modcontext = $this->_customdata['modcontext']; $modcontext = $this->_customdata['modcontext'];
$mform->addElement('header', 'general', get_string('addsession','attforblock'));
$mform->addElement('header', 'general', get_string('addsession','attforblock'));//fill in the data depending on page params
//later using set_data
$groupmode = groups_get_activity_groupmode($cm); $groupmode = groups_get_activity_groupmode($cm);
switch ($groupmode) { switch ($groupmode) {

8
duration_form.php

@ -14,6 +14,14 @@
// 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/>.
/**
* This file contains the forms for duration
*
* @package mod_attendance
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->libdir.'/formslib.php'); require_once($CFG->libdir.'/formslib.php');
class mod_attforblock_duration_form extends moodleform { class mod_attforblock_duration_form extends moodleform {

5
export.php

@ -17,12 +17,11 @@
/** /**
* Export attendance sessions * Export attendance sessions
* *
* @package mod * @package mod_attendance
* @subpackage attforblock * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @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
*/ */
require_once(dirname(__FILE__).'/../../config.php'); require_once(dirname(__FILE__).'/../../config.php');
require_once(dirname(__FILE__).'/locallib.php'); require_once(dirname(__FILE__).'/locallib.php');
require_once(dirname(__FILE__).'/export_form.php'); require_once(dirname(__FILE__).'/export_form.php');

8
export_form.php

@ -14,6 +14,14 @@
// 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/>.
/**
* Export attendance sessions forms
*
* @package mod_attendance
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->libdir.'/formslib.php'); require_once($CFG->libdir.'/formslib.php');
class mod_attforblock_export_form extends moodleform { class mod_attforblock_export_form extends moodleform {

9
index.php

@ -14,8 +14,13 @@
// 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/>.
/// This page lists all the instances of attforblock in a particular course /**
/// Replace attforblock with the name of your module * lists all the instances of attforblock in a particular course
*
* @package mod_attendance
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../../config.php'); require_once('../../config.php');

8
lib.php

@ -14,7 +14,13 @@
// 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/>.
/// Library of functions and constants for module attforblock /**
* Library of functions and constants for module attforblock
*
* @package mod_attendance
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/** /**
* Returns the information if the module supports a feature * Returns the information if the module supports a feature

8
locallib.php

@ -14,6 +14,14 @@
// 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/>.
/**
* local functions and constants for module attforblock
*
* @package mod_attendance
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
global $CFG; global $CFG;

5
manage.php

@ -17,12 +17,11 @@
/** /**
* Manage attendance sessions * Manage attendance sessions
* *
* @package mod * @package mod_attforblock
* @subpackage attforblock * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @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
*/ */
require_once(dirname(__FILE__).'/../../config.php'); require_once(dirname(__FILE__).'/../../config.php');
require_once(dirname(__FILE__).'/locallib.php'); require_once(dirname(__FILE__).'/locallib.php');

8
mod_form.php

@ -14,6 +14,14 @@
// 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/>.
/**
* Forms for updating/adding attforblock
*
* @package mod_attforblock
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
if (!defined('MOODLE_INTERNAL')) { if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
} }

5
preferences.php

@ -17,12 +17,11 @@
/** /**
* Manage attendance settings * Manage attendance settings
* *
* @package mod * @package mod_attforblock
* @subpackage attforblock * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @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
*/ */
require_once(dirname(__FILE__).'/../../config.php'); require_once(dirname(__FILE__).'/../../config.php');
require_once(dirname(__FILE__).'/locallib.php'); require_once(dirname(__FILE__).'/locallib.php');

4
renderables.php

@ -17,8 +17,8 @@
/** /**
* Attendance module renderable components are defined here * Attendance module renderable components are defined here
* *
* @package mod * @package mod_attforblock
* @subpackage attforblock * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @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
renderer.php

@ -17,8 +17,8 @@
/** /**
* Attendance module renderering methods * Attendance module renderering methods
* *
* @package mod * @package mod_attforblock
* @subpackage attforblock * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @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
renderhelpers.php

@ -17,8 +17,8 @@
/** /**
* Attendance module renderering helpers * Attendance module renderering helpers
* *
* @package mod * @package mod_attforblock
* @subpackage attforblock * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @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
*/ */

5
report.php

@ -17,12 +17,11 @@
/** /**
* Attendance report * Attendance report
* *
* @package mod * @package mod_attforblock
* @subpackage attforblock * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @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
*/ */
require_once(dirname(__FILE__).'/../../config.php'); require_once(dirname(__FILE__).'/../../config.php');
require_once(dirname(__FILE__).'/locallib.php'); require_once(dirname(__FILE__).'/locallib.php');

5
sessions.php

@ -17,12 +17,11 @@
/** /**
* Adding attendance sessions * Adding attendance sessions
* *
* @package mod * @package mod_attforblock
* @subpackage attforblock * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @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
*/ */
require_once(dirname(__FILE__).'/../../config.php'); require_once(dirname(__FILE__).'/../../config.php');
require_once(dirname(__FILE__).'/locallib.php'); require_once(dirname(__FILE__).'/locallib.php');
require_once(dirname(__FILE__).'/add_form.php'); require_once(dirname(__FILE__).'/add_form.php');

8
take.php

@ -14,6 +14,14 @@
// 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/>.
/**
* Take Attendance
*
* @package mod_attforblock
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__).'/../../config.php'); require_once(dirname(__FILE__).'/../../config.php');
require_once(dirname(__FILE__).'/locallib.php'); require_once(dirname(__FILE__).'/locallib.php');

9
update_form.php

@ -14,6 +14,15 @@
// 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/>.
/**
* Update form
*
* @package mod_attforblock
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->libdir.'/formslib.php'); require_once($CFG->libdir.'/formslib.php');
class mod_attforblock_update_form extends moodleform { class mod_attforblock_update_form extends moodleform {

7
version.php

@ -17,13 +17,14 @@
/** /**
* Version information * Version information
* *
* @package mod * @package mod_attforblock
* @subpackage attforblock
* @copyright 2011 Artem Andreev <andreev.artem@gmail.com> * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @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
*/ */
$module->version = 2012120700; // The current module version (Date: YYYYMMDDXX) $module->version = 2012120700; // The current module version (Date: YYYYMMDDXX)
$module->release = '2.4.0'; $module->requires = 2012120300;
$module->release = '2.4.1';
$module->maturity = MATURITY_ALPHA;
$module->cron = 0; // Period for cron to check this module (secs) $module->cron = 0; // Period for cron to check this module (secs)
$module->component = 'mod_attforblock'; // Full name of the plugin (used for diagnostics) $module->component = 'mod_attforblock'; // Full name of the plugin (used for diagnostics)

4
view.php

@ -17,8 +17,8 @@
/** /**
* Prints attendance info for particular user * Prints attendance info for particular user
* *
* @package mod * @package mod_attforblock
* @subpackage attforblock * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
* @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
*/ */

Loading…
Cancel
Save