Browse Source

Fix coding guideline stuff found by plugins db check.

MOODLE_33_STABLE
Dan Marsden 8 years ago
parent
commit
4924a32b3a
  1. 16
      calendar.js
  2. 5
      classes/attendance_webservices_handler.php
  3. 4
      db/upgrade.php
  4. 3
      externallib.php
  5. 2
      module.js
  6. 44
      styles.css
  7. 3
      tests/attendance_webservices_test.php

16
calendar.js

@ -3,7 +3,7 @@ YUI().use('yui2-container', 'yui2-calendar', function(Y) {
document.body.className += ' yui-skin-sam';
YAHOO.util.Event.onDOMReady(function(){
YAHOO.util.Event.onDOMReady(function() {
var Event = YAHOO.util.Event,
Dom = YAHOO.util.Dom,
@ -36,12 +36,12 @@ YUI().use('yui2-container', 'yui2-calendar', function(Y) {
});
dialog = new YAHOO.widget.Dialog("attcalendarcontainer", {
visible:false,
context:["show", "tl", "bl"],
buttons:[{text: M.str.attendance.caltoday, handler: resetHandler, isDefault:true},
visible: false,
context: ["show", "tl", "bl"],
buttons: [{text: M.str.attendance.caltoday, handler: resetHandler, isDefault: true},
{text: M.str.attendance.calclose, handler: closeHandler}],
draggable:false,
close:false
draggable: false,
close: false
});
dialog.setHeader('');
dialog.setBody('<div id="cal"></div>');
@ -61,8 +61,8 @@ YUI().use('yui2-container', 'yui2-calendar', function(Y) {
if (!calendar) {
calendar = new YAHOO.widget.Calendar("cal", {
iframe:false, // Turn iframe off, since container has iframe support.
hide_blank_weeks:true // Enable, to demonstrate how we handle changing height, using changeContent.
iframe: false, // Turn iframe off, since container has iframe support.
hide_blank_weeks: true // Enable, to demonstrate how we handle changing height, using changeContent.
});
calendar.cfg.setProperty("start_weekday", M.attendance.cal_start_weekday);

5
classes/attendance_webservices_handler.php

@ -14,12 +14,15 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Web Services for Attendance plugin.
*
* @package local_attendance
* @package mod_attendance
* @copyright 2015 Caio Bressan Doneda
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once(dirname(__FILE__).'/../../../config.php');
require_once(dirname(__FILE__).'/../locallib.php');
require_once(dirname(__FILE__).'/structure.php');

4
db/upgrade.php

@ -46,7 +46,7 @@ function xmldb_attendance_upgrade($oldversion=0) {
$dbman->add_field($table, $field);
}
upgrade_mod_savepoint($result, 2014112000, 'attendance');
upgrade_mod_savepoint(true, 2014112000, 'attendance');
}
if ($oldversion < 2014112001) {
@ -85,7 +85,7 @@ function xmldb_attendance_upgrade($oldversion=0) {
// Delete old capabilities.
$DB->delete_records_select('capabilities', 'component = ?', array('mod_attforblock'));
upgrade_plugin_savepoint($result, 2014112001, 'mod', 'attendance');
upgrade_mod_savepoint(true, 2014112001, 'attendance');
}
if ($oldversion < 2015040501) {

3
externallib.php

@ -14,8 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Externallib.php file for attendance plugin.
*
* @package local_attendance
* @package mod_attendance
* @copyright 2015 Caio Bressan Doneda
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

2
module.js

@ -12,7 +12,7 @@ M.mod_attendance.init_manage = function(Y) {
this.set('checked', '');
});
}
}, '#cb_selector' );
}, '#cb_selector');
};
M.mod_attendance.set_preferences_action = function(action) {

44
styles.css

@ -1,5 +1,5 @@
.path-mod-attendance .attbtn {
border:1px solid #AAAAAA;
border: 1px solid #aaa;
border-radius: 5px;
margin-left: 2px;
margin-right: 2px;
@ -14,27 +14,27 @@
.path-mod-attendance .attfiltercontrols {
margin-bottom: 10px;
margin-left:auto;
margin-right:auto;
width:90%;
margin-left: auto;
margin-right: auto;
width: 90%;
}
.path-mod-attendance .attfiltercontrols #currentdate{
.path-mod-attendance .attfiltercontrols #currentdate {
display: inline;
}
.path-mod-attendance .attwidth {
margin: auto;
width:90%;
width: 90%;
}
.path-mod-attendance .userwithoutenrol,
.path-mod-attendance .userwithoutenrol a{
.path-mod-attendance .userwithoutenrol a {
color: gray;
}
.path-mod-attendance .userwithoutdata,
.path-mod-attendance .userwithoutdata a{
.path-mod-attendance .userwithoutdata a {
color: red;
}
@ -43,8 +43,8 @@
}
.path-mod-attendance .takelist .userpicture {
margin:0 3px;
vertical-align:middle;
margin: 0 3px;
vertical-align: middle;
}
.path-mod-attendance .takegrid input {
@ -74,14 +74,14 @@
}
/* for IE7*/
.path-mod-attendance .filtercontrols td {
padding:6px;
padding: 6px;
}
.path-mod-attendance .takecontrols {
margin: 0 auto 20px auto;
width: 800px;
}
.path-mod-attendance .takecontrols table{
.path-mod-attendance .takecontrols table {
margin: 0 auto;
}
.path-mod-attendance .takecontrols .c0 {
@ -99,11 +99,11 @@
}
.path-mod-attendance table.userinfobox {
border: 1px solid #EEEEEE;
border: 1px solid #eee;
padding: 0;
}
.path-mod-attendance table.userinfobox td.left {
background-color: #EEEEEE;
background-color: #eee;
padding: 30px 10px;
}
.path-mod-attendance table.attlist td.c0 {
@ -152,11 +152,11 @@
}
.path-mod-attendance .attendancestatus-E {
color: #00AEE3;
color: #00aee3;
}
.path-mod-attendance .attendancestatus-L {
color: #F7931E;
color: #f7931e;
}
.path-mod-attendance .attendancestatus-A {
@ -164,25 +164,25 @@
}
.path-mod-attendance .attreport .contrast {
background-color: #EAEAEA;
background-color: #eaeaea;
}
.path-mod-attendance .attreport .center {
text-align:center;
text-align: center;
}
.path-mod-attendance .attreport .left {
text-align:left;
text-align: left;
}
.path-mod-attendance .attreport .bottom {
vertical-align:bottom;
vertical-align: bottom;
}
.path-mod-attendance .attreport .nowrap {
white-space:nowrap;
white-space: nowrap;
}
.path-mod-attendance .attreport .narrow {
width:1px;
width: 1px;
}

3
tests/attendance_webservices_test.php

@ -14,8 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Webservices test for attendance plugin.
*
* @package local_attendance
* @package mod_attendance
* @copyright 2015 Caio Bressan Doneda
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Loading…
Cancel
Save