Skip to content

Commit

Permalink
MDL-21249 improved php docs and adding direct access prevention in po…
Browse files Browse the repository at this point in the history
…rtfolio
  • Loading branch information
skodak committed Jul 25, 2010
1 parent 7ad5a62 commit 0972665
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 9 deletions.
4 changes: 3 additions & 1 deletion lib/portfolio/caller.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package moodle
* @package core
* @subpackage portfolio
* @author Penny Leach <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
Expand All @@ -28,6 +28,8 @@
* See http://docs.moodle.org/en/Development:Adding_a_Portfolio_Button_to_a_page
*/

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

/**
* base class for callers
*
Expand Down
4 changes: 3 additions & 1 deletion lib/portfolio/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package moodle
* @package core
* @subpackage portfolio
* @author Penny Leach <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
Expand All @@ -26,6 +26,8 @@
* This file contains all the defined constants to do with portfolios.
*/

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

// ************************************************** //
// EXPORT STAGE CONSTANTS
// ************************************************** //
Expand Down
4 changes: 3 additions & 1 deletion lib/portfolio/exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package moodle
* @package core
* @subpackage portfolio
* @author Penny Leach <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
Expand All @@ -26,6 +26,8 @@
* This file contains all the portfolio exception classes.
*/

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

/**
* top level portfolio exception.
* sometimes caught and rethrown as {@see portfolio_export_exception}
Expand Down
4 changes: 3 additions & 1 deletion lib/portfolio/exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package moodle
* @package core
* @subpackage portfolio
* @author Penny Leach <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
Expand All @@ -26,6 +26,8 @@
* This file contains the class definition for the exporter object.
*/

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

/**
* The class that handles the various stages of the actual export
* and the communication between the caller and the portfolio plugin.
Expand Down
4 changes: 3 additions & 1 deletion lib/portfolio/formats.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package moodle
* @package core
* @subpackage portfolio
* @author Penny Leach <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
Expand All @@ -28,6 +28,8 @@
* Because it provides an easy way to do subtyping using php inheritance.
*/

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

/**
* base class to inherit from
* do not use this anywhere in supported_formats
Expand Down
4 changes: 3 additions & 1 deletion lib/portfolio/formats/leap2a/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package moodle
* @package core
* @subpackage portfolio
* @author Penny Leach <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
Expand All @@ -26,6 +26,8 @@
* This file contains the LEAP2a writer used by portfolio_format_leap2a
*/

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

/**
* object to encapsulate the writing of leap2a.
* should be used like:
Expand Down
4 changes: 3 additions & 1 deletion lib/portfolio/forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package moodle
* @package core
* @subpackage portfolio
* @author Penny Leach <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
Expand All @@ -26,6 +26,8 @@
* This file contains all the form definitions used by the portfolio code.
*/

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

// make sure we include moodleform first!
require_once ($CFG->libdir.'/formslib.php');

Expand Down
6 changes: 4 additions & 2 deletions lib/portfolio/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package moodle
* @package core
* @subpackage portfolio
* @author Penny Leach <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
Expand All @@ -29,6 +29,8 @@
* See http://docs.moodle.org/en/Development:Writing_a_Portfolio_Plugin
*/

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

/**
* the base class for portfolio plugins
* all plugins must subclass this
Expand Down Expand Up @@ -114,7 +116,7 @@ public function supported_formats() {

/**
* override this if you are supporting the 'file' type (or a subformat)
* but have restrictions on mimetypes
* but have restrictions on mimetypes
*
* @return boolean
*/
Expand Down

0 comments on commit 0972665

Please sign in to comment.