Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
a17b297d
Commit
a17b297d
authored
Feb 23, 2011
by
Tim Hunt
Browse files
MDL-20636 Add missing defined('MOODLE_INTERNAL') || die();
parent
7764183a
Changes
294
Hide whitespace changes
Inline
Side-by-side
mod/quiz/accessrules.php
View file @
a17b297d
...
...
@@ -16,7 +16,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
*
Sets up the tabs used by the quiz pages based on the users capabilites
.
*
Classes to enforce the various access rules that can apply to a quiz
.
*
* @package mod
* @subpackage quiz
...
...
@@ -24,6 +24,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
/**
* This class keeps track of the various access rules that apply to a particular
* quiz, with convinient methods for seeing whether access is allowed.
...
...
mod/quiz/addrandomform.php
View file @
a17b297d
...
...
@@ -25,6 +25,8 @@
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
require_once
(
$CFG
->
libdir
.
'/formslib.php'
);
...
...
mod/quiz/attemptlib.php
View file @
a17b297d
...
...
@@ -28,9 +28,7 @@
*/
if
(
!
defined
(
'MOODLE_INTERNAL'
))
{
die
(
'Direct access to this script is forbidden.'
);
/// It must be included from a Moodle page.
}
defined
(
'MOODLE_INTERNAL'
)
||
die
();
/**
...
...
mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php
View file @
a17b297d
...
...
@@ -22,8 +22,12 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
require_once
(
$CFG
->
dirroot
.
'/mod/quiz/backup/moodle2/backup_quiz_stepslib.php'
);
// Because it exists (must)
/**
* quiz backup task that provides all the settings and steps to perform one
* complete backup of the activity
...
...
mod/quiz/backup/moodle2/backup_quiz_stepslib.php
View file @
a17b297d
...
...
@@ -22,12 +22,12 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* D
efine
all the backup steps that will be used by the backup_quiz_activity_task
*/
d
efine
d
(
'MOODLE_INTERNAL'
)
||
die
();
/**
* Define
the complete quiz structure for backup, with file and id annotations
* Define
all the backup steps that will be used by the backup_quiz_activity_task
*/
class
backup_quiz_activity_structure_step
extends
backup_questions_activity_structure_step
{
...
...
mod/quiz/backup/moodle2/restore_quiz_activity_task.class.php
View file @
a17b297d
...
...
@@ -22,10 +22,12 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
require_once
(
$CFG
->
dirroot
.
'/mod/quiz/backup/moodle2/restore_quiz_stepslib.php'
);
// Because it exists (must)
/**
* quiz restore task that provides all the settings and steps to perform one
* complete restore of the activity
...
...
mod/quiz/backup/moodle2/restore_quiz_stepslib.php
View file @
a17b297d
...
...
@@ -22,9 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* D
efine
all the restore steps that will be used by the restore_quiz_activity_task
*/
d
efine
d
(
'MOODLE_INTERNAL'
)
||
die
();
/**
* Structure step to restore one quiz activity
...
...
mod/quiz/db/access.php
View file @
a17b297d
...
...
@@ -24,6 +24,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$capabilities
=
array
(
// Ability to see that the quiz exists, and the basic information
...
...
mod/quiz/db/install.php
View file @
a17b297d
...
...
@@ -25,6 +25,9 @@
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
/**
* Code run after the quiz module database tables have been created.
*/
...
...
mod/quiz/db/messages.php
View file @
a17b297d
...
...
@@ -24,6 +24,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$messageproviders
=
array
(
// Notify teacher that a student has submitted a quiz attempt
'submission'
=>
array
(
...
...
mod/quiz/db/subplugins.php
View file @
a17b297d
...
...
@@ -24,4 +24,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$subplugins
=
array
(
'quiz'
=>
'mod/quiz/report'
);
mod/quiz/db/upgrade.php
View file @
a17b297d
...
...
@@ -25,6 +25,9 @@
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
/**
* Quiz module upgrade function.
* @param string $oldversion the version we are upgrading from.
...
...
mod/quiz/editlib.php
View file @
a17b297d
...
...
@@ -30,8 +30,9 @@
*/
require_once
(
$CFG
->
dirroot
.
'/mod/quiz/locallib.php'
);
defined
(
'MOODLE_INTERNAL'
)
||
die
(
);
require_once
(
$CFG
->
dirroot
.
'/mod/quiz/locallib.php'
);
define
(
'NUM_QS_TO_SHOW_IN_RANDOM'
,
3
);
...
...
mod/quiz/lib.php
View file @
a17b297d
...
...
@@ -28,9 +28,9 @@
*/
/** Require {@link eventslib.php} */
defined
(
'MOODLE_INTERNAL'
)
||
die
();
require_once
(
$CFG
->
libdir
.
'/eventslib.php'
);
/** Require {@link calendar/lib.php} */
require_once
(
$CFG
->
dirroot
.
'/calendar/lib.php'
);
...
...
mod/quiz/locallib.php
View file @
a17b297d
...
...
@@ -30,13 +30,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
if
(
!
defined
(
'MOODLE_INTERNAL'
))
{
die
(
'Direct access to this script is forbidden.'
);
/// It must be included from a Moodle page.
}
/**
* Include those library functions that are also used by core Moodle or other modules
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
require_once
(
$CFG
->
dirroot
.
'/mod/quiz/lib.php'
);
require_once
(
$CFG
->
dirroot
.
'/mod/quiz/accessrules.php'
);
require_once
(
$CFG
->
dirroot
.
'/mod/quiz/attemptlib.php'
);
...
...
@@ -44,7 +40,6 @@ require_once($CFG->dirroot . '/question/editlib.php');
require_once
(
$CFG
->
libdir
.
'/eventslib.php'
);
require_once
(
$CFG
->
libdir
.
'/filelib.php'
);
/// Constants ///////////////////////////////////////////////////////////////////
/**#@+
* Options determining how the grades from individual attempts are combined to give
...
...
mod/quiz/mod_form.php
View file @
a17b297d
...
...
@@ -25,9 +25,7 @@
*/
if
(
!
defined
(
'MOODLE_INTERNAL'
))
{
die
(
'Direct access to this script is forbidden.'
);
/// It must be included from a Moodle page
}
defined
(
'MOODLE_INTERNAL'
)
||
die
();
require_once
(
$CFG
->
dirroot
.
'/course/moodleform_mod.php'
);
require_once
(
$CFG
->
dirroot
.
'/mod/quiz/locallib.php'
);
...
...
mod/quiz/override_form.php
View file @
a17b297d
...
...
@@ -25,9 +25,7 @@
*/
if
(
!
defined
(
'MOODLE_INTERNAL'
))
{
die
(
'Direct access to this script is forbidden.'
);
/// It must be included from a Moodle page
}
defined
(
'MOODLE_INTERNAL'
)
||
die
();
require_once
$CFG
->
libdir
.
'/formslib.php'
;
...
...
mod/quiz/report/attemptsreport.php
View file @
a17b297d
...
...
@@ -27,6 +27,8 @@
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
require_once
(
$CFG
->
libdir
.
'/tablelib.php'
);
...
...
mod/quiz/report/default.php
View file @
a17b297d
...
...
@@ -25,6 +25,9 @@
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
/**
* Base class for quiz report plugins.
*
...
...
mod/quiz/report/grading/db/access.php
View file @
a17b297d
...
...
@@ -24,6 +24,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$capabilities
=
array
(
// Is the user allowed to see the student's real names while grading?
'quiz/grading:viewstudentnames'
=>
array
(
...
...
Prev
1
2
3
4
5
…
15
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment