Browse Source

Fix up some coding guideline stuff.

MOODLE_32_STABLE
Dan Marsden 8 years ago
parent
commit
5df4a02e19
  1. 1
      classes/sessions_page_params.php
  2. 1
      classes/structure.php
  3. 6
      classes/summary.php
  4. 1
      classes/take_page_params.php
  5. 1
      classes/view_page_params.php
  6. 1
      db/access.php
  7. 1
      db/install.php
  8. 1
      db/services.php
  9. 1
      db/upgrade.php
  10. 2
      db/upgradelib.php
  11. 1
      duration_form.php
  12. 1
      export_form.php
  13. 5
      mod_form.php
  14. 1
      student_attendance_form.php
  15. 20
      styles.css
  16. 2
      update_form.php
  17. 1
      version.php

1
classes/sessions_page_params.php

@ -22,6 +22,7 @@
* @copyright 2016 Dan Marsden http://danmarsden.com * @copyright 2016 Dan Marsden http://danmarsden.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
*/ */
defined('MOODLE_INTERNAL') || die();
/** /**
* stores constants/data used by sessions page params. * stores constants/data used by sessions page params.

1
classes/structure.php

@ -21,6 +21,7 @@
* @copyright 2016 Dan Marsden http://danmarsden.com * @copyright 2016 Dan Marsden http://danmarsden.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
*/ */
defined('MOODLE_INTERNAL') || die();
require_once(dirname(__FILE__) . '/calendar_helpers.php'); require_once(dirname(__FILE__) . '/calendar_helpers.php');

6
classes/summary.php

@ -14,6 +14,9 @@
// 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/>.
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/mod/attendance/locallib.php');
/** /**
* Class that computes summary of users points * Class that computes summary of users points
* *
@ -21,9 +24,6 @@
* @copyright 2016 Antonio Carlos Mariani http://antonio.c.mariani@gmail.com * @copyright 2016 Antonio Carlos Mariani http://antonio.c.mariani@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($CFG->dirroot . '/mod/attendance/locallib.php');
class mod_attendance_summary { class mod_attendance_summary {
/** @var int attendance instance identifier */ /** @var int attendance instance identifier */

1
classes/take_page_params.php

@ -13,6 +13,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/>.
defined('MOODLE_INTERNAL') || die();
/** /**
* Class definition for mod_attendance_take_page_params * Class definition for mod_attendance_take_page_params

1
classes/view_page_params.php

@ -13,6 +13,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/>.
defined('MOODLE_INTERNAL') || die();
/** /**
* Class definition for mod_attendance_view_page_params * Class definition for mod_attendance_view_page_params

1
db/access.php

@ -13,6 +13,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/>.
defined('MOODLE_INTERNAL') || die();
/** /**
* Capability definitions for this module. * Capability definitions for this module.

1
db/install.php

@ -13,6 +13,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/>.
defined('MOODLE_INTERNAL') || die();
/** /**
* post installation hook for adding data. * post installation hook for adding data.

1
db/services.php

@ -13,6 +13,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/>.
defined('MOODLE_INTERNAL') || die();
/** /**
* Web service local plugin attendance external functions and service definitions. * Web service local plugin attendance external functions and service definitions.

1
db/upgrade.php

@ -14,6 +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/>.
defined('MOODLE_INTERNAL') || die();
require_once(dirname(__FILE__) . '/upgradelib.php'); require_once(dirname(__FILE__) . '/upgradelib.php');
/** /**

2
db/upgradelib.php

@ -14,6 +14,8 @@
// 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/>.
defined('MOODLE_INTERNAL') || die();
/** /**
* Helper functions to keep upgrade.php clean. * Helper functions to keep upgrade.php clean.
* *

1
duration_form.php

@ -22,6 +22,7 @@
* @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
*/ */
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php'); require_once($CFG->libdir.'/formslib.php');
/** /**

1
export_form.php

@ -22,6 +22,7 @@
* @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
*/ */
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php'); require_once($CFG->libdir.'/formslib.php');
/** /**

5
mod_form.php

@ -22,10 +22,7 @@
* @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
*/ */
if (!defined('MOODLE_INTERNAL')) { defined('MOODLE_INTERNAL') || die();
die('Direct access to this script is forbidden.');
}
require_once($CFG->dirroot.'/course/moodleform_mod.php'); require_once($CFG->dirroot.'/course/moodleform_mod.php');
/** /**

1
student_attendance_form.php

@ -14,6 +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/>.
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php'); require_once($CFG->libdir.'/formslib.php');
class mod_attendance_student_attendance_form extends moodleform { class mod_attendance_student_attendance_form extends moodleform {

20
styles.css

@ -1,5 +1,6 @@
.path-mod-attendance .attbtn { .path-mod-attendance .attbtn {
border:1px solid #AAAAAA; border:1px solid #AAAAAA;
border-radius: 5px;
margin-left: 2px; margin-left: 2px;
margin-right: 2px; margin-right: 2px;
padding: 5px; padding: 5px;
@ -7,7 +8,6 @@
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
-opera-border-radius: 5px; -opera-border-radius: 5px;
-khtml-border-radius: 5px; -khtml-border-radius: 5px;
border-radius: 5px;
} }
.path-mod-attendance .attcurbtn { .path-mod-attendance .attcurbtn {
@ -18,8 +18,8 @@
.path-mod-attendance .attfiltercontrols { .path-mod-attendance .attfiltercontrols {
margin-bottom: 10px !important; margin-bottom: 10px !important;
margin-right:auto;
margin-left:auto; margin-left:auto;
margin-right:auto;
} }
.path-mod-attendance .attfiltercontrols #currentdate{ .path-mod-attendance .attfiltercontrols #currentdate{
@ -27,8 +27,8 @@
} }
.path-mod-attendance .attwidth { .path-mod-attendance .attwidth {
width:90%;
margin: auto; margin: auto;
width:90%;
} }
.path-mod-attendance .userwithoutenrol, .path-mod-attendance .userwithoutenrol,
@ -59,8 +59,8 @@
} }
.path-mod-attendance table.controls { .path-mod-attendance table.controls {
width: 100%;
text-align: center; text-align: center;
width: 100%;
} }
.path-mod-attendance table.controls tr { .path-mod-attendance table.controls tr {
@ -81,15 +81,15 @@
} }
.path-mod-attendance .takecontrols { .path-mod-attendance .takecontrols {
width: 800px;
margin: 0 auto 20px auto; margin: 0 auto 20px auto;
width: 800px;
} }
.path-mod-attendance .takecontrols table{ .path-mod-attendance .takecontrols table{
margin: 0 auto; margin: 0 auto;
} }
.path-mod-attendance .takecontrols .c0 { .path-mod-attendance .takecontrols .c0 {
width: 500px;
text-align: left; text-align: left;
width: 500px;
} }
.path-mod-attendance .takecontrols .c1 { .path-mod-attendance .takecontrols .c1 {
text-align: right; text-align: right;
@ -133,15 +133,15 @@
} }
.path-mod-attendance .remarkholder .remarkcontent { .path-mod-attendance .remarkholder .remarkcontent {
display: none; background-color: white;
position: absolute;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 3px; border-radius: 3px;
box-shadow: 3px 3px 5px #ccc; box-shadow: 3px 3px 5px #ccc;
background-color: white; display: none;
left: 20px; left: 20px;
top: 0;
padding: 5px; padding: 5px;
position: absolute;
top: 0;
width: 150px; width: 150px;
z-index: 5000; z-index: 5000;
} }

2
update_form.php

@ -22,7 +22,7 @@
* @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
*/ */
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php'); require_once($CFG->libdir.'/formslib.php');
/** /**

1
version.php

@ -21,6 +21,7 @@
* @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
*/ */
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2016082900; $plugin->version = 2016082900;
$plugin->requires = 2016052300; $plugin->requires = 2016052300;

Loading…
Cancel
Save