MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup
This commit is contained in:
+1
-1
@@ -100,4 +100,4 @@ switch ($action) {
|
||||
|
||||
redirect ($returnurl);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ function print_auth_lock_options ($auth, $user_fields, $helptext, $retrieveopts,
|
||||
$fieldname = get_string('webpage');
|
||||
} else {
|
||||
$fieldname = get_string($fieldname);
|
||||
}
|
||||
}
|
||||
if ($retrieveopts) {
|
||||
$varname = 'field_map_' . $field;
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<?PHP // $Id$
|
||||
<?php
|
||||
|
||||
// block.php - allows admin to edit all local configuration variables for a block
|
||||
|
||||
@@ -73,4 +73,4 @@
|
||||
echo '</form>';
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<?PHP // $Id$
|
||||
<?php
|
||||
|
||||
// Allows the admin to configure blocks (hide/show, delete and configure)
|
||||
|
||||
@@ -212,4 +212,4 @@
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php /// $Id$
|
||||
<?php
|
||||
/// Create "blog" forums in each course and copy blog entries from these courses' participants in these forums
|
||||
|
||||
require_once('../config.php');
|
||||
|
||||
+30
-30
@@ -9,7 +9,7 @@
|
||||
/// version of PHP compiled for CGI.
|
||||
///
|
||||
/// eg wget -q -O /dev/null 'http://moodle.somewhere.edu/admin/cron.php'
|
||||
/// or php /web/moodle/admin/cron.php
|
||||
/// or php /web/moodle/admin/cron.php
|
||||
set_time_limit(0);
|
||||
$starttime = microtime();
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/// check if execution allowed
|
||||
if (isset($_SERVER['REMOTE_ADDR'])) { // if the script is accessed via the web.
|
||||
if (!empty($CFG->cronclionly)) {
|
||||
if (!empty($CFG->cronclionly)) {
|
||||
// This script can only be run via the cli.
|
||||
print_error('cronerrorclionly', 'admin');
|
||||
exit;
|
||||
@@ -51,7 +51,7 @@
|
||||
$pass = optional_param('password', '', PARAM_RAW);
|
||||
if($pass != $CFG->cronremotepassword) {
|
||||
// wrong password.
|
||||
print_error('cronerrorpassword', 'admin');
|
||||
print_error('cronerrorpassword', 'admin');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@
|
||||
if (file_exists($blockfile)) {
|
||||
require_once($blockfile);
|
||||
$classname = 'block_'.$block->name;
|
||||
$blockobj = new $classname;
|
||||
$blockobj = new $classname;
|
||||
if (method_exists($blockobj,'cron')) {
|
||||
mtrace("Processing cron function for ".$block->name.'....','');
|
||||
if ($blockobj->cron()) {
|
||||
@@ -177,7 +177,7 @@
|
||||
}
|
||||
}
|
||||
mtrace("Finished quiz reports");
|
||||
|
||||
|
||||
mtrace('Starting admin reports');
|
||||
// Admin reports do not have a database table that lists them. Instead a
|
||||
// report includes cron.php with function report_reportname_cron() if it wishes
|
||||
@@ -254,7 +254,7 @@
|
||||
}
|
||||
|
||||
/// Run all core cron jobs, but not every time since they aren't too important.
|
||||
/// These don't have a timer to reduce load, so we'll use a random number
|
||||
/// These don't have a timer to reduce load, so we'll use a random number
|
||||
/// to randomly choose the percentage of times we should run these jobs.
|
||||
|
||||
srand ((double) microtime() * 10000000);
|
||||
@@ -367,21 +367,21 @@
|
||||
mtrace('Synchronised metacourses');
|
||||
|
||||
//
|
||||
// generate new password emails for users
|
||||
// generate new password emails for users
|
||||
//
|
||||
mtrace('checking for create_password');
|
||||
if ($DB->count_records('user_preferences', array('name'=>'create_password', 'value'=>'1'))) {
|
||||
mtrace('creating passwords for new users');
|
||||
$newusers = $DB->get_records_sql("SELECT u.id as id, u.email, u.firstname,
|
||||
$newusers = $DB->get_records_sql("SELECT u.id as id, u.email, u.firstname,
|
||||
u.lastname, u.username,
|
||||
p.id as prefid
|
||||
FROM {user} u
|
||||
p.id as prefid
|
||||
FROM {user} u
|
||||
JOIN {user_preferences} p ON u.id=p.userid
|
||||
WHERE p.name='create_password' AND p.value='1' AND u.email !='' ");
|
||||
|
||||
foreach ($newusers as $newuserid => $newuser) {
|
||||
$newuser->emailstop = 0; // send email regardless
|
||||
// email user
|
||||
// email user
|
||||
if (setnew_password_and_mail($newuser)) {
|
||||
// remove user pref
|
||||
$DB->delete_records('user_preferences', array('id'=>$newuser->prefid));
|
||||
@@ -390,20 +390,20 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!empty($CFG->usetags)) {
|
||||
require_once($CFG->dirroot.'/tag/lib.php');
|
||||
tag_cron();
|
||||
mtrace ('Executed tag cron');
|
||||
}
|
||||
|
||||
|
||||
// Accesslib stuff
|
||||
cleanup_contexts();
|
||||
mtrace ('Cleaned up contexts');
|
||||
gc_cache_flags();
|
||||
mtrace ('Cleaned cache flags');
|
||||
// If you suspect that the context paths are somehow corrupt
|
||||
// replace the line below with: build_context_path(true);
|
||||
// replace the line below with: build_context_path(true);
|
||||
build_context_path();
|
||||
mtrace ('Built context paths');
|
||||
|
||||
@@ -418,8 +418,8 @@
|
||||
@set_time_limit(0);
|
||||
@raise_memory_limit("192M");
|
||||
if (function_exists('apache_child_terminate')) {
|
||||
// if we are running from Apache, give httpd a hint that
|
||||
// it can recycle the process after it's done. Apache's
|
||||
// if we are running from Apache, give httpd a hint that
|
||||
// it can recycle the process after it's done. Apache's
|
||||
// memory management is truly awful but we can help it.
|
||||
@apache_child_terminate();
|
||||
}
|
||||
@@ -431,7 +431,7 @@
|
||||
include_once("$CFG->dirroot/backup/backuplib.php");
|
||||
include_once("$CFG->dirroot/backup/lib.php");
|
||||
mtrace("Running backups if required...");
|
||||
|
||||
|
||||
if (! schedule_backup_cron()) {
|
||||
mtrace("ERROR: Something went wrong while performing backup tasks!!!");
|
||||
} else {
|
||||
@@ -507,51 +507,51 @@
|
||||
|
||||
// run gradebook import/export/report cron
|
||||
if ($gradeimports = get_plugin_list('gradeimport')) {
|
||||
foreach ($gradeimports as $gradeimport => $plugindir) {
|
||||
foreach ($gradeimports as $gradeimport => $plugindir) {
|
||||
if (file_exists($plugindir.'/lib.php')) {
|
||||
require_once($plugindir.'/lib.php');
|
||||
$cron_function = 'grade_import_'.$gradeimport.'_cron';
|
||||
$cron_function = 'grade_import_'.$gradeimport.'_cron';
|
||||
if (function_exists($cron_function)) {
|
||||
mtrace("Processing gradebook import function $cron_function ...", '');
|
||||
$cron_function;
|
||||
$cron_function;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($gradeexports = get_plugin_list('gradeexport')) {
|
||||
foreach ($gradeexports as $gradeexport => $plugindir) {
|
||||
foreach ($gradeexports as $gradeexport => $plugindir) {
|
||||
if (file_exists($plugindir.'/lib.php')) {
|
||||
require_once($plugindir.'/lib.php');
|
||||
$cron_function = 'grade_export_'.$gradeexport.'_cron';
|
||||
$cron_function = 'grade_export_'.$gradeexport.'_cron';
|
||||
if (function_exists($cron_function)) {
|
||||
mtrace("Processing gradebook export function $cron_function ...", '');
|
||||
$cron_function;
|
||||
$cron_function;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($gradereports = get_plugin_list('gradereport')) {
|
||||
foreach ($gradereports as $gradereport => $plugindir) {
|
||||
foreach ($gradereports as $gradereport => $plugindir) {
|
||||
if (file_exists($plugindir.'/lib.php')) {
|
||||
require_once($plugindir.'/lib.php');
|
||||
$cron_function = 'grade_report_'.$gradereport.'_cron';
|
||||
$cron_function = 'grade_report_'.$gradereport.'_cron';
|
||||
if (function_exists($cron_function)) {
|
||||
mtrace("Processing gradebook report function $cron_function ...", '');
|
||||
$cron_function;
|
||||
$cron_function;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Run external blog cron if needed
|
||||
if ($CFG->useexternalblogs) {
|
||||
require_once($CFG->dirroot . '/blog/lib.php');
|
||||
mtrace("Fetching external blog entries...", '');
|
||||
$sql = "timefetched < ? - ? OR timefetched = 0";
|
||||
$externalblogs = $DB->get_records_select('blog_external', $sql, array(mktime(), $CFG->externalblogcrontime));
|
||||
|
||||
|
||||
foreach ($external_blogs as $eb) {
|
||||
blog_sync_external_entries($eb);
|
||||
}
|
||||
@@ -584,7 +584,7 @@
|
||||
mtrace("Cron script completed correctly");
|
||||
|
||||
$difftime = microtime_diff($starttime, microtime());
|
||||
mtrace("Execution took ".$difftime." seconds");
|
||||
mtrace("Execution took ".$difftime." seconds");
|
||||
|
||||
/// finish the IE hack
|
||||
if (check_browser_version('MSIE')) {
|
||||
|
||||
@@ -19,7 +19,7 @@ if ($data = $form->get_data()) {
|
||||
throw new dbtransfer_exception('notargetconectexception', null, "$CFG->wwwroot/$CFG->admin/dbtransfer/");
|
||||
}
|
||||
if ($targetdb->get_tables()) {
|
||||
throw new dbtransfer_exception('targetdatabasenotempty', null, "$CFG->wwwroot/$CFG->admin/dbtransfer/");
|
||||
throw new dbtransfer_exception('targetdatabasenotempty', null, "$CFG->wwwroot/$CFG->admin/dbtransfer/");
|
||||
}
|
||||
|
||||
// Start output.
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@
|
||||
|
||||
if (empty($sure)) {
|
||||
$optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey());
|
||||
|
||||
|
||||
$formcontinue = html_form::make_button('delete.php', $optionsyes, get_string('yes'));
|
||||
$formcancel = html_form::make_button('index.php', null, get_string('no'), 'get');
|
||||
echo $OUTPUT->confirm('Are you completely sure you want to delete everything inside the directory '. $deletedir .' ?', $formcontinue, $formcancel);
|
||||
@@ -34,8 +34,8 @@
|
||||
$optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey(), 'reallysure'=>'yes');
|
||||
$formcontinue = html_form::make_button('delete.php', $optionsyes, get_string('yes'));
|
||||
$formcancel = html_form::make_button('index.php', null, get_string('no'), 'get');
|
||||
echo $OUTPUT->confirm('Are you REALLY REALLY completely sure you want to delete everything inside the directory '.
|
||||
$deletedir .' (this includes all user images, and any other course files that have been created) ?',
|
||||
echo $OUTPUT->confirm('Are you REALLY REALLY completely sure you want to delete everything inside the directory '.
|
||||
$deletedir .' (this includes all user images, and any other course files that have been created) ?',
|
||||
$formcontinue, $formcancel);
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@
|
||||
echo '<input type="hidden" name="savesettings" value="1" />';
|
||||
echo '<fieldset>';
|
||||
echo '<div class="form-item clearfix" id="admin-sendcoursewelcomemessage">';
|
||||
|
||||
|
||||
echo '<div class="form-label"><label for = "menusendcoursewelcomemessage">' . get_string('sendcoursewelcomemessage', 'admin');
|
||||
echo '<span class="form-shortname">sendcoursewelcomemessage</span>';
|
||||
echo '</label></div>';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?PHP // $Id$
|
||||
<?php
|
||||
// enrol_config.php - allows admin to edit all enrollment variables
|
||||
// Yes, enrol is correct English spelling.
|
||||
|
||||
@@ -67,4 +67,4 @@
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
exit;
|
||||
?>
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
/// Handle the 'updatecomponent' action
|
||||
if ($action == 'updatecomponent' && confirm_sesskey()) {
|
||||
/// Create component installer and execute it
|
||||
if ($cd = new component_installer('http://download.moodle.org',
|
||||
'environment',
|
||||
if ($cd = new component_installer('http://download.moodle.org',
|
||||
'environment',
|
||||
'environment.zip')) {
|
||||
$status = $cd->install(); //returns COMPONENT_(ERROR | UPTODATE | INSTALLED)
|
||||
switch ($status) {
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@
|
||||
$title = get_string('deletefilterareyousure', 'admin', $filtername);
|
||||
admin_externalpage_print_header();
|
||||
echo $OUTPUT->heading($title);
|
||||
|
||||
|
||||
$linkcontinue = new moodle_url($returnurl, array('action' => 'delete', 'filterpath' => $filterpath, 'confirm' => 1));
|
||||
$formcancel = html_form::make_button($returnurl, null, get_string('no'), 'get');
|
||||
echo $OUTPUT->confirm(get_string('deletefilterareyousuremessage', 'admin', $filtername), $linkcontinue, $formcancel);
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ class generator {
|
||||
global $CFG;
|
||||
|
||||
$this->starttime = time()+microtime();
|
||||
|
||||
|
||||
$arguments = array(
|
||||
array('short'=>'u', 'long'=>'username',
|
||||
'help' => 'Your moodle username', 'type'=>'STRING', 'default' => ''),
|
||||
|
||||
@@ -86,7 +86,7 @@ function notify_admins($user,$subject,$a) {
|
||||
$eventdata->fullmessage = $body;
|
||||
$eventdata->fullmessageformat = FORMAT_PLAIN;
|
||||
$eventdata->fullmessagehtml = '';
|
||||
$eventdata->smallmessage = '';
|
||||
$eventdata->smallmessage = '';
|
||||
events_trigger('message_send', $eventdata);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -533,7 +533,7 @@ class problem_000013 extends problem_base {
|
||||
}
|
||||
function exists() {
|
||||
global $DB;
|
||||
$positionexpr = $DB->sql_position($DB->sql_concat("','", "q.id", "','"),
|
||||
$positionexpr = $DB->sql_position($DB->sql_concat("','", "q.id", "','"),
|
||||
$DB->sql_concat("','", "qma.sequence", "','"));
|
||||
return $DB->record_exists_sql("
|
||||
SELECT * FROM {question} q
|
||||
|
||||
+1
-1
@@ -42,4 +42,4 @@
|
||||
echo $OUTPUT->footer();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+3
-3
@@ -841,7 +841,7 @@
|
||||
if ($preview_url) {
|
||||
$link = html_link::make($preview_url, get_string('preview'));
|
||||
$link->add_action(new popup_action('click', $link->url));
|
||||
echo $OUTPUT->link($link);
|
||||
echo $OUTPUT->link($link);
|
||||
}
|
||||
echo '</fieldset>';
|
||||
}
|
||||
@@ -861,7 +861,7 @@
|
||||
if ($preview_url) {
|
||||
$link = html_link::make($preview_url, get_string('preview'));
|
||||
$link->add_action(new popup_action('click', $link->url));
|
||||
echo $OUTPUT->link($link);
|
||||
echo $OUTPUT->link($link);
|
||||
}
|
||||
echo '</fieldset>';
|
||||
}
|
||||
@@ -885,7 +885,7 @@
|
||||
if ($preview_url) {
|
||||
$link = html_link::make($preview_url, get_string('preview'));
|
||||
$link->add_action(new popup_action('click', $link->url));
|
||||
echo $OUTPUT->link($link);
|
||||
echo $OUTPUT->link($link);
|
||||
}
|
||||
echo '</fieldset>';
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php //$Id$
|
||||
<?php
|
||||
///This file only manages the installation of 1.6 lang packs.
|
||||
///in downloads.moodle.org, they are store in separate directory /lang16
|
||||
///in local server, they are stored in $CFG->dataroot/lang
|
||||
@@ -449,4 +449,4 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* - Run your admin/cron.php
|
||||
*
|
||||
* - Read /tmp/moodle-mailout.log
|
||||
*
|
||||
*
|
||||
*
|
||||
* This script will create logfiles in /tmp/ or in $TMPDIR if set.
|
||||
* On windows, use php -r 'print sys_get_temp_dir()' to see where the file is saved.
|
||||
|
||||
@@ -24,7 +24,7 @@ echo $OUTPUT->box_start();
|
||||
<input type="hidden" name="step" value="<?php echo $mnet_peer->nextstep; ?>" />
|
||||
<input type="hidden" name="hostid" value="<?php echo ($mnet_peer->id)? $mnet_peer->id : '0' ; ?>" />
|
||||
<table cellpadding="9" cellspacing="0" >
|
||||
<?php
|
||||
<?php
|
||||
foreach($myservices as $name => $versions) {
|
||||
$version = current($versions);
|
||||
?>
|
||||
@@ -40,7 +40,7 @@ echo $OUTPUT->box_start();
|
||||
} else {
|
||||
$versionstring = '';
|
||||
}
|
||||
|
||||
|
||||
echo $breakstring;
|
||||
?>
|
||||
<input type="hidden" name="exists[<?php echo $version['serviceid']; ?>]" value="1" />
|
||||
@@ -48,29 +48,29 @@ echo $OUTPUT->box_start();
|
||||
<input type="hidden" name="publish[<?php echo $version['serviceid']; ?>]" value="0" />
|
||||
<?php } else { ?>
|
||||
<input type="checkbox" name="publish[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_publish']))? 'checked="checked" ': '' ; ?>/>
|
||||
<?php
|
||||
<?php
|
||||
print_string('publish','mnet');
|
||||
echo $versionstring;
|
||||
if (!empty($version['hostsubscribes'])) {
|
||||
echo '<a href="#" title="'.get_string('issubscribed','mnet', $mnet_peer->name).'">√</a> ';
|
||||
echo $versionstring;
|
||||
if (!empty($version['hostsubscribes'])) {
|
||||
echo '<a href="#" title="'.get_string('issubscribed','mnet', $mnet_peer->name).'">√</a> ';
|
||||
}
|
||||
if (!empty($version['allhosts_publish'])) {
|
||||
if (!empty($version['allhosts_publish'])) {
|
||||
print_string("enabled_for_all",'mnet',!empty($version['I_publish']));
|
||||
}
|
||||
}
|
||||
echo '<br />';
|
||||
} ?>
|
||||
<input type="checkbox" name="subscribe[<?php echo $version['serviceid']; ?>]" <?php echo (!empty($version['I_subscribe']))? 'checked="checked" ': '' ; ?>/>
|
||||
<?php
|
||||
<?php
|
||||
print_string('subscribe','mnet');
|
||||
echo $versionstring;
|
||||
if (!empty($version['hostpublishes'])) {
|
||||
echo $versionstring;
|
||||
if (!empty($version['hostpublishes'])) {
|
||||
echo '<a href="#" title="'.get_string('ispublished','mnet', $mnet_peer->name).'">√</a> ';
|
||||
}
|
||||
}
|
||||
if (!empty($version['allhosts_subscribe'])) {
|
||||
print_string("enabled_for_all",'mnet',!empty($version['I_subscribe']));
|
||||
}
|
||||
|
||||
echo '<br />';
|
||||
|
||||
echo '<br />';
|
||||
$breakstring = '. . . . . . . . . . . . . . . . . . . . . . . . <br>';
|
||||
} // end foreach
|
||||
?>
|
||||
|
||||
@@ -13,7 +13,7 @@ $tabs[] = new tabobject('mnetservices', 'mnet_services.php?step=list&hostid=
|
||||
$tabs[] = new tabobject('mnetthemes', 'mnet_themes.php?step=list&hostid='.$mnet_peer->id, $strmnetthemes, $strmnetthemes, false);
|
||||
if ($mnet_peer->id != $CFG->mnet_all_hosts_id) {
|
||||
$tabs[] = new tabobject('mnetlog', $logurl, $strmnetlog, $strmnetlog, false);
|
||||
}
|
||||
}
|
||||
|
||||
print_tabs(array($tabs), 'mnetthemes');
|
||||
|
||||
@@ -69,12 +69,12 @@ print_tabs(array($tabs), 'mnetthemes');
|
||||
$readme = '<li>'.
|
||||
$link = html_link::make($CFG->themewww .'/'. $theme .'/README.html', $strinfo);
|
||||
$link->add_action(new popup_action('click', $link->url, $theme, array('height' => 400, 'width' => 500)));
|
||||
echo $OUTPUT->link($link);
|
||||
echo $OUTPUT->link($link);
|
||||
} else if (file_exists($CFG->themedir.'/'.$theme.'/README.txt')) {
|
||||
$readme = '<li>'.
|
||||
$link = html_link::make($CFG->themewww .'/'. $theme .'/README.txt', $strinfo);
|
||||
$link->add_action(new popup_action('click', $link->url, $theme, array('height' => 400, 'width' => 500)));
|
||||
echo $OUTPUT->link($link);
|
||||
echo $OUTPUT->link($link);
|
||||
}
|
||||
if (file_exists("$theme/screenshot.png")) {
|
||||
$screenshotpath = "$theme/screenshot.png";
|
||||
|
||||
@@ -25,7 +25,7 @@ admin_externalpage_print_header();
|
||||
<tr>
|
||||
<th class="header c0" colspan="2"><?php print_string('testtrustedhosts', 'mnet'); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
if (!empty($test_ip_address)){
|
||||
?>
|
||||
<tr>
|
||||
@@ -48,7 +48,7 @@ admin_externalpage_print_header();
|
||||
<td class="cell c1" colspan="2"><?php print_string('testtrustedhostsexplain', 'mnet'); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td class="cell c1" colspan="2">
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<?PHP // $Id$
|
||||
<?php
|
||||
// Allows the admin to manage activity modules
|
||||
|
||||
require_once('../config.php');
|
||||
@@ -180,4 +180,4 @@
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php /// $Id$
|
||||
<?php
|
||||
/// Search and replace strings throughout all texts in the whole database
|
||||
|
||||
require_once('../config.php');
|
||||
@@ -115,4 +115,4 @@ function multilangupgrade_impl($langblock) {
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ function online_assignment_cleanup($output=false) {
|
||||
FROM {course_modules} cm, {assignment} a
|
||||
WHERE cm.id = ? AND cm.module = ? AND
|
||||
cm.instance = a.id AND a.assignmenttype = 'online'";
|
||||
$params = array($instance, $aid);
|
||||
$params = array($instance, $aid);
|
||||
|
||||
/// if record exists then we need to move instance to it's correct section
|
||||
if ($DB->record_exists_sql($sql, $params)) {
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<?PHP // $Id$
|
||||
<?php
|
||||
// phpinfo.php - shows phpinfo for the current server
|
||||
|
||||
require_once("../config.php");
|
||||
@@ -30,4 +30,4 @@
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+1
-1
@@ -111,4 +111,4 @@ if (!empty($return)) {
|
||||
redirect($baseurl);
|
||||
}
|
||||
echo $OUTPUT->footer();
|
||||
?>
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ if ($_ENV['RECIPIENT'] == $CFG->noreplyaddress) {
|
||||
if (!validate_email($user->email)) {
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$site = get_site();
|
||||
$subject = get_string('noreplybouncesubject','moodle',format_string($site->fullname));
|
||||
$body = get_string('noreplybouncemessage','moodle',format_string($site->fullname))."\n\n";
|
||||
|
||||
|
||||
$fd = fopen('php://stdin','r');
|
||||
if ($fd) {
|
||||
while(!feof($fd)) {
|
||||
@@ -27,14 +27,14 @@ if ($_ENV['RECIPIENT'] == $CFG->noreplyaddress) {
|
||||
}
|
||||
fclose($fd);
|
||||
}
|
||||
|
||||
|
||||
$user->id = 0; // to prevent anything annoying happening
|
||||
|
||||
|
||||
$from->firstname = null;
|
||||
$from->lastname = null;
|
||||
$from->email = '<>';
|
||||
$from->maildisplay = true;
|
||||
|
||||
|
||||
email_to_user($user,$from,$subject,$body);
|
||||
die ();
|
||||
}
|
||||
@@ -60,7 +60,7 @@ else {
|
||||
$function = $modname.'_process_email';
|
||||
|
||||
if (!function_exists($function)) {
|
||||
die();
|
||||
die();
|
||||
}
|
||||
$fd = fopen('php://stdin','r');
|
||||
if (!$fd) {
|
||||
@@ -71,7 +71,7 @@ while(!feof($fd)) {
|
||||
$body .= fgets($fd);
|
||||
}
|
||||
|
||||
$function($modargs,$body);
|
||||
$function($modargs,$body);
|
||||
|
||||
fclose($fd);
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<?PHP // $Id$
|
||||
<?php
|
||||
// Allows the admin to manage question types.
|
||||
|
||||
require_once(dirname(__FILE__) . '/../config.php');
|
||||
@@ -286,4 +286,4 @@ function icon_html($action, $qtypename, $icon, $alt, $tip) {
|
||||
$html .= '</div></form>';
|
||||
return $html;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
// register.php - allows admin to register their site on moodle.org
|
||||
|
||||
require_once('../config.php');
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<?php /// $Id$
|
||||
<?php
|
||||
/// Search and replace strings throughout all texts in the whole database
|
||||
|
||||
require_once('../config.php');
|
||||
@@ -59,4 +59,4 @@ echo $OUTPUT->continue_button('index.php');
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
// searches for admin settings
|
||||
|
||||
@@ -62,4 +62,4 @@ echo '</form>';
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ $PAGE->set_focuscontrol($focus);
|
||||
if (empty($SITE->fullname)) {
|
||||
$PAGE->set_title($settingspage->visiblename);
|
||||
$PAGE->set_heading($settingspage->visiblename);
|
||||
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->box(get_string('configintrosite', 'admin'));
|
||||
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
if (!is_numeric($zone)) {
|
||||
//not a path, but it looks like it anyway
|
||||
$zone = clean_param($zone, PARAM_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
require_login();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
$PAGE->set_heading($strtimezone);
|
||||
$PAGE->navbar->add($strtimezone);
|
||||
echo $OUTPUT->header();
|
||||
|
||||
|
||||
echo $OUTPUT->heading("");
|
||||
|
||||
if (data_submitted() and !empty($zone) and confirm_sesskey()) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
// Automatic update of Timezones from a new source
|
||||
|
||||
|
||||
require_once('../config.php');
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
require_once($CFG->libdir.'/filelib.php');
|
||||
require_once($CFG->libdir.'/olson.php');
|
||||
|
||||
|
||||
admin_externalpage_setup('timezoneimport');
|
||||
|
||||
$ok = optional_param('ok', 0, PARAM_BOOL);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
|
||||
// detects settings that were added during an upgrade, displays a screen for the admin to
|
||||
// modify them, and then processes modifications
|
||||
@@ -68,4 +68,4 @@ echo '</form>';
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ require_once('uploadpicture_form.php');
|
||||
|
||||
define ('PIX_FILE_UPDATED', 0);
|
||||
define ('PIX_FILE_ERROR', 1);
|
||||
define ('PIX_FILE_SKIPPED', 2);
|
||||
|
||||
define ('PIX_FILE_SKIPPED', 2);
|
||||
|
||||
admin_externalpage_setup('uploadpictures');
|
||||
|
||||
require_login();
|
||||
@@ -76,12 +76,12 @@ if ($formdata = $mform->get_data()) {
|
||||
if (function_exists('apache_child_terminate')) {
|
||||
@apache_child_terminate();
|
||||
}
|
||||
|
||||
|
||||
// Create a unique temporary directory, to process the zip file
|
||||
// contents.
|
||||
$zipodir = my_mktempdir($CFG->dataroot.'/temp/', 'usrpic');
|
||||
$dstfile = $zipodir.'/images.zip';
|
||||
|
||||
|
||||
if (!$mform->save_file('userfile', $dstfile, true)) {
|
||||
echo $OUTPUT->notification(get_string('uploadpicture_cannotmovezip','admin'));
|
||||
@remove_dir($zipdir);
|
||||
@@ -93,12 +93,12 @@ if ($formdata = $mform->get_data()) {
|
||||
// We don't need the zip file any longer, so delete it to make
|
||||
// it easier to process the rest of the files inside the directory.
|
||||
@unlink($dstfile);
|
||||
|
||||
|
||||
$results = array ('errors' => 0,'updated' => 0);
|
||||
|
||||
process_directory($zipdir, $userfields[$userfield], $overwritepicture, $results);
|
||||
|
||||
|
||||
|
||||
// Finally remove the temporary directory with all the user images and print some stats.
|
||||
remove_dir($zipdir);
|
||||
echo $OUTPUT->notification(get_string('usersupdated', 'admin') . ": " . $results['updated']);
|
||||
@@ -195,7 +195,7 @@ function process_directory ($dir, $userfield, $overwrite, &$results) {
|
||||
*/
|
||||
function process_file ($file, $userfield, $overwrite) {
|
||||
global $DB, $OUTPUT;
|
||||
|
||||
|
||||
// Add additional checks on the filenames, as they are user
|
||||
// controlled and we don't want to open any security holes.
|
||||
$path_parts = pathinfo(cleardoubleslashes($file));
|
||||
@@ -247,7 +247,7 @@ function process_file ($file, $userfield, $overwrite) {
|
||||
* picture file to.
|
||||
* @param string $originalfile the full path of the picture file.
|
||||
*
|
||||
* @return bool
|
||||
* @return bool
|
||||
*/
|
||||
function my_save_profile_image($id, $originalfile) {
|
||||
$destination = create_profile_image_destination($id, 'user');
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
class admin_uploadpicture_form extends moodleform {
|
||||
function definition (){
|
||||
global $CFG, $USER;
|
||||
|
||||
|
||||
$mform =& $this->_form;
|
||||
|
||||
|
||||
$this->set_upload_manager(new upload_manager('userpicturesfile', false, false, null, false, 0, true, true, false));
|
||||
|
||||
|
||||
$mform->addElement('header', 'settingsheader', get_string('upload'));
|
||||
|
||||
|
||||
$mform->addElement('file', 'userpicturesfile', get_string('file'), 'size="40"');
|
||||
$mform->addRule('userpicturesfile', null, 'required');
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
$choices = array( 0 => get_string('no'), 1 => get_string('yes') );
|
||||
$mform->addElement('select', 'overwritepicture', get_string('uploadpicture_overwrite', 'admin'), $choices);
|
||||
$mform->setType('overwritepicture', PARAM_INT);
|
||||
|
||||
|
||||
$this->add_action_buttons(false, get_string('uploadpictures', 'admin'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1020,4 +1020,4 @@ function uu_allowed_roles($shortname=false) {
|
||||
|
||||
return $choices;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php // $Id$
|
||||
<?php
|
||||
require_once $CFG->libdir.'/formslib.php';
|
||||
|
||||
class admin_uploaduser_form1 extends moodleform {
|
||||
@@ -335,4 +335,4 @@ class admin_uploaduser_form2 extends moodleform {
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
+3
-3
@@ -119,7 +119,7 @@
|
||||
// create the user filter form
|
||||
$ufiltering = new user_filtering();
|
||||
admin_externalpage_print_header();
|
||||
|
||||
|
||||
// Carry on with the user listing
|
||||
|
||||
$columns = array("firstname", "lastname", "email", "city", "country", "lastaccess");
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
$alphabet = explode(',', get_string('alphabet'));
|
||||
$strall = get_string('all');
|
||||
|
||||
|
||||
$baseurl = new moodle_url('user.php', array('sort' => $sort, 'dir' => $dir, 'perpage' => $perpage));
|
||||
echo $OUTPUT->paging_bar(moodle_paging_bar::make($usercount, $page, $perpage, $baseurl));
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
($CFG->fullnamedisplay == 'firstname') or
|
||||
($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'firstname lastname' )) {
|
||||
$fullnamedisplay = "$firstname / $lastname";
|
||||
} else { // ($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'lastname firstname')
|
||||
} else { // ($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'lastname firstname')
|
||||
$fullnamedisplay = "$lastname / $firstname";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user