Skip to content

Commit

Permalink
MDL-21249 improved php docs and adding direct access prevention in ed…
Browse files Browse the repository at this point in the history
…itors
  • Loading branch information
skodak committed Jul 25, 2010
1 parent 1b396b1 commit 7ad5a62
Show file tree
Hide file tree
Showing 16 changed files with 156 additions and 127 deletions.
7 changes: 4 additions & 3 deletions lib/editor/textarea/lang/en/editor_textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
/**
* Strings for component 'editor_textarea', language 'en', branch 'MOODLE_20_STABLE'
*
* @package editor_textarea
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @package editor
* @subpackage textarea
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['pluginname'] = 'Plain text area';
5 changes: 4 additions & 1 deletion lib/editor/textarea/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
/**
* Failsafe textarea editor support.
*
* @package editor_textarea
* @package editor
* @subpackage textarea
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

class textarea_texteditor extends texteditor {
public function supported_by_browser() {
return true;
Expand Down
7 changes: 5 additions & 2 deletions lib/editor/textarea/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Failsafe textare editor support version file.
* Failsafe textarea editor support version file.
*
* @package editor_textarea
* @package editor
* @subpackage textarea
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2009051400;
$plugin->requires = 2009051200;
3 changes: 2 additions & 1 deletion lib/editor/tinymce/extra/strings.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
/**
* On-the-fly conversion of Moodle lang strings to TinyMCE expected JS format.
*
* @package editor_tinymce
* @package editor
* @subpackage tinymce
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/editor/tinymce/extra/tools/update_lang_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
/**
* This script imports TinyMCE lang strings into Moodle lang packs.
*
* @package moodlecore
* @subpackage editor
* @package editor
* @subpackage tinymce
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand Down
3 changes: 2 additions & 1 deletion lib/editor/tinymce/lang/en/editor_tinymce.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
/**
* Strings for component 'editor_tinymce', language 'en', branch 'MOODLE_20_STABLE'
*
* @package editor_tinymce
* @package editor
* @subpackage tinymce
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand Down
5 changes: 4 additions & 1 deletion lib/editor/tinymce/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
/**
* TinyMCE text editor integration.
*
* @package editor_tinymce
* @package editor
* @subpackage tinymce
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

class tinymce_texteditor extends texteditor {
/** @var string active version - directory name */
public $version = '3.3.8';
Expand Down
3 changes: 2 additions & 1 deletion lib/editor/tinymce/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
/**
* TinyMCE admin settings
*
* @package editor_tinymce
* @package editor
* @subpackage tinymce
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand Down
5 changes: 4 additions & 1 deletion lib/editor/tinymce/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
/**
* TinyMCE text editor integration version file.
*
* @package editor_tinymce
* @package editor
* @subpackage tinymce
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2010070400;
$plugin->requires = 2010070300;
$plugin->release = '3.3.8';
6 changes: 4 additions & 2 deletions lib/grade/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
/**
* Definitions of constants for gradebook
*
* @package moodlecore
* @package core
* @subpackage grade
* @copyright 2007 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/


defined('MOODLE_INTERNAL') || die();

// category aggregation types
define('GRADE_AGGREGATE_MEAN', 0);
define('GRADE_AGGREGATE_MEDIAN', 2);
Expand Down
7 changes: 5 additions & 2 deletions lib/grade/grade_category.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@
/**
* Definitions of constants for gradebook
*
* @package moodlecore
* @package core
* @subpackage grade
* @copyright 2006 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

require_once('grade_object.php');

/**
Expand Down Expand Up @@ -1513,7 +1516,7 @@ public static function set_properties(&$instance, $params) {
//Flip from the default of 0 to 1 (or vice versa) if ALL items in the category are still set to the old default.
if ($params->aggregation==GRADE_AGGREGATE_WEIGHTED_MEAN || $params->aggregation==GRADE_AGGREGATE_EXTRACREDIT_MEAN) {
$sql = $defaultaggregationcoef = null;

if ($params->aggregation==GRADE_AGGREGATE_WEIGHTED_MEAN) {
//if all items in this category have aggregation coefficient of 0 we can change it to 1 ie evenly weighted
$sql = "select count(id) from {grade_items} where categoryid=:categoryid and aggregationcoef!=0";
Expand Down
46 changes: 24 additions & 22 deletions lib/grade/grade_grade.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<?php

///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
// //
// This program 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 2 of the License, or //
// (at your option) any later version. //
// //
// This program 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: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
// 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/>.
/**
* Definitions of grade grade class
*
* @package core
* @subpackage grade
* @copyright 2006 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

require_once('grade_object.php');

Expand Down
45 changes: 23 additions & 22 deletions lib/grade/grade_item.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
<?php

///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
// //
// This program 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 2 of the License, or //
// (at your option) any later version. //
// //
// This program 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: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
// 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/>.
/**
* Definitions of grade item class
*
* @package core
* @subpackage grade
* @copyright 2006 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();
require_once('grade_object.php');

/**
Expand Down
45 changes: 23 additions & 22 deletions lib/grade/grade_object.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
<?php

///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
// //
// This program 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 2 of the License, or //
// (at your option) any later version. //
// //
// This program 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: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
// 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/>.
/**
* Definitions of grade object class
*
* @package core
* @subpackage grade
* @copyright 2006 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();
/**
* An abstract object that holds methods and attributes common to all grade_* objects defined here.
* @abstract
Expand Down
46 changes: 24 additions & 22 deletions lib/grade/grade_outcome.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<?php

///////////////////////////////////////////////////////////////////////////
// //
// NOTICE OF COPYRIGHT //
// //
// Moodle - Modular Object-Oriented Dynamic Learning Environment //
// http://moodle.com //
// //
// Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com //
// //
// This program 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 2 of the License, or //
// (at your option) any later version. //
// //
// This program 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: //
// //
// http://www.gnu.org/copyleft/gpl.html //
// //
///////////////////////////////////////////////////////////////////////////
// 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/>.
/**
* Definitions of grade outcome class
*
* @package core
* @subpackage grade
* @copyright 2006 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

require_once('grade_object.php');

Expand Down
Loading

0 comments on commit 7ad5a62

Please sign in to comment.