Skip to content

Commit

Permalink
Merge branch 'depress_warning_in_cli_mode_cas' into MOODLE_21_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
sunner committed Aug 4, 2011
2 parents e27a537 + e7b337a commit 5baeaa4
Show file tree
Hide file tree
Showing 35 changed files with 418 additions and 82 deletions.
50 changes: 48 additions & 2 deletions admin/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
$hide = optional_param('hide', 0, PARAM_INT);
$show = optional_param('show', 0, PARAM_INT);
$delete = optional_param('delete', 0, PARAM_INT);
$unprotect = optional_param('unprotect', 0, PARAM_INT);
$protect = optional_param('protect', 0, PARAM_INT);

/// Print headings

Expand All @@ -24,6 +26,9 @@
$strcourses = get_string('blockinstances', 'admin');
$strname = get_string('name');
$strshowblockcourse = get_string('showblockcourse');
$strprotecthdr = get_string('blockprotect', 'admin'). $OUTPUT->help_icon('blockprotect','admin');
$strprotect = get_string('blockprotect', 'admin');
$strunprotect = get_string('blockunprotect', 'admin');

/// If data submitted, then process and store.

Expand All @@ -43,6 +48,36 @@
admin_get_root(true, false); // settings not required - only pages
}

if (!isset($CFG->undeletableblocktypes) || (!is_array($CFG->undeletableblocktypes) && !is_string($CFG->undeletableblocktypes))) {
$undeletableblocktypes = array('navigation', 'settings');
} else if (is_string($CFG->undeletableblocktypes)) {
$undeletableblocktypes = explode(',', $CFG->undeletableblocktypes);
} else {
$undeletableblocktypes = $CFG->undeletableblocktypes;
}

if (!empty($protect) && confirm_sesskey()) {
if (!$block = $DB->get_record('block', array('id'=>$protect))) {
print_error('blockdoesnotexist', 'error');
}
if (!in_array($block->name, $undeletableblocktypes)) {
$undeletableblocktypes[] = $block->name;
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
}
admin_get_root(true, false); // settings not required - only pages
}

if (!empty($unprotect) && confirm_sesskey()) {
if (!$block = $DB->get_record('block', array('id'=>$unprotect))) {
print_error('blockdoesnotexist', 'error');
}
if (in_array($block->name, $undeletableblocktypes)) {
$undeletableblocktypes = array_diff($undeletableblocktypes, array($block->name));
set_config('undeletableblocktypes', implode(',', $undeletableblocktypes));
}
admin_get_root(true, false); // settings not required - only pages
}

if (!empty($delete) && confirm_sesskey()) {
echo $OUTPUT->header();
echo $OUTPUT->heading($strmanageblocks);
Expand Down Expand Up @@ -114,8 +149,8 @@

$table = new flexible_table('admin-blocks-compatible');

$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strdelete, $strsettings));
$table->define_columns(array('name', 'instances', 'version', 'hideshow', 'undeletable', 'delete', 'settings'));
$table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strprotecthdr, $strdelete, $strsettings));
$table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php');
$table->set_attribute('class', 'compatibleblockstable blockstable generaltable');
$table->setup();
Expand Down Expand Up @@ -191,12 +226,23 @@
$version = "$block->version ($plugin->version)";
}

if (!$blockobject) {
// ignore
$undeletable = '';
} else if (in_array($blockname, $undeletableblocktypes)) {
$undeletable = '<a href="blocks.php?unprotect='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strunprotect.'">'.
'<img src="'.$OUTPUT->pix_url('t/unlock') . '" class="icon" alt="'.$strunprotect.'" /></a>';
} else {
$undeletable = '<a href="blocks.php?protect='.$blockid.'&amp;sesskey='.sesskey().'" title="'.$strprotect.'">'.
'<img src="'.$OUTPUT->pix_url('t/unlock_gray') . '" class="icon" alt="'.$strprotect.'" /></a>';
}

$table->add_data(array(
'<span'.$class.'>'.$strblockname.'</span>',
$blocklist,
'<span'.$class.'>'.$version.'</span>',
$visible,
$undeletable,
$delete,
$settings
));
Expand Down
4 changes: 4 additions & 0 deletions admin/cli/install_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
--adminuser=USERNAME Username for the moodle admin account. Default is admin.
--adminpass=PASSWORD Password for the moodle admin account.
--agree-license Indicates agreement with software license.
--fullname Name of the site
--shortname Name of the site
-h, --help Print out this help
Example:
Expand Down Expand Up @@ -93,6 +95,8 @@
'lang' => 'en',
'adminuser' => 'admin',
'adminpass' => '',
'fullname' => '',
'shortname' => '',
'agree-license' => false,
'help' => false
),
Expand Down
1 change: 1 addition & 0 deletions admin/settings/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
$temp->add(new admin_setting_configcheckbox('groupenrolmentkeypolicy', get_string('groupenrolmentkeypolicy', 'admin'), get_string('groupenrolmentkeypolicy_desc', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('disableuserimages', get_string('disableuserimages', 'admin'), get_string('configdisableuserimages', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('emailchangeconfirmation', get_string('emailchangeconfirmation', 'admin'), get_string('configemailchangeconfirmation', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('strictformsrequired', get_string('strictformsrequired', 'admin'), get_string('configstrictformsrequired', 'admin'), 0));
$ADMIN->add('security', $temp);


Expand Down
2 changes: 1 addition & 1 deletion auth/cas/CAS/CAS.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
//
// hack by Vangelis Haniotakis to handle the absence of $_SERVER['REQUEST_URI'] in IIS
//
if (!isset($_SERVER['REQUEST_URI'])) {
if (!isset($_SERVER['REQUEST_URI']) && !defined('CLI_SCRIPT')) {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
}

Expand Down
10 changes: 6 additions & 4 deletions backup/moodle2/backup_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,9 @@ protected function define_structure() {
// attach format plugin structure to $module element, only one allowed
$this->add_plugin_structure('format', $module, false);

// attach plagiarism plugin structure to $module element, only one allowed
$this->add_plugin_structure('plagiarism', $module, false);
// attach plagiarism plugin structure to $module element, there can be potentially
// many plagiarism plugins storing information about this course
$this->add_plugin_structure('plagiarism', $module, true);

// Define the tree
$module->add_child($availinfo);
Expand Down Expand Up @@ -421,8 +422,9 @@ protected function define_structure() {
// course reports can save course data if required
$this->add_plugin_structure('coursereport', $course, true);

// attach plagiarism plugin structure to $course element, only one allowed
$this->add_plugin_structure('plagiarism', $course, false);
// attach plagiarism plugin structure to $course element, there can be potentially
// many plagiarism plugins storing information about this course
$this->add_plugin_structure('plagiarism', $course, true);

// Build the tree

Expand Down
5 changes: 0 additions & 5 deletions config-dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@
// These blocks are used when no other default setting is found.
// $CFG->defaultblocks = 'participants,activity_modules,search_forums,admin,course_list:news_items,calendar_upcoming,recent_activity';
//
// The blocks in this list will be protected from deletion, and this is primarily
// used to protect the navigation and settings blocks which can be very hard to
// get back if accidentally delete.
// $CFG->undeletableblocktypes = 'navigation,settings';
//
// You can specify a different class to be created for the $PAGE global, and to
// compute which blocks appear on each page. However, I cannot think of any good
// reason why you would need to change that. It just felt wrong to hard-code the
Expand Down
2 changes: 1 addition & 1 deletion filter/mediaplugin/lang/en/filter_mediaplugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$string['flashanimation'] = 'Flash animation';
$string['flashanimation_help'] = 'Files with extension *.swf. For security reasons this filter is used only in trusted texts.';
$string['flashvideo'] = 'Flash video';
$string['flashvideo_help'] = 'Files with extension *.flv and *.f4v. Plays video clips using Flowplayer, requires Flash plugin and javascript. Uses HTML 5 video fallback if multiple sources psecified.';
$string['flashvideo_help'] = 'Files with extension *.flv and *.f4v. Plays video clips using Flowplayer, requires Flash plugin and javascript. Uses HTML 5 video fallback if multiple sources specified.';
$string['html5audio'] = 'HTML 5 audio';
$string['html5audio_help'] = 'Audio files with extension *.ogg, *.aac and others. It is compatible with latest web browsers only, unfortunately there is no format that is supported by all browsers.
Workaround is to specify fallbacks separated with # (ex: http://example.org/audio.aac#http://example.org/audio.aac#http://example.org/audio.mp3#), QuickTime player is used as a fallback for old browsers, fallback can be any audio type.';
Expand Down
2 changes: 1 addition & 1 deletion filter/mediaplugin/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
* see http://flowplayer.org/documentation/skinning/controlbar.html?skin=default for more color properties,
* any property that ends with '...Color' is supported here.
*/
.mp3flowplayer_backgroundColor {color: #000000};
.mp3flowplayer_backgroundColor {color: #000000;}
46 changes: 46 additions & 0 deletions install/lang/bn/error.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

// 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/>.

/**
* Automatically generated strings for Moodle 2.1 installer
*
* Do not edit this file manually! It contains just a subset of strings
* needed during the very first steps of installation. This file was
* generated automatically by export-installer.php (which is part of AMOS
* {@link http://docs.moodle.org/dev/Languages/AMOS}) using the
* list of strings defined in /install/stringnames.txt.
*
* @package installer
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['cannotcreatelangdir'] = 'lang ডিরেক্টরি তৈরি করতে পারে না';
$string['cannotcreatetempdir'] = 'টেম্প ডিরেক্টরি তৈরি করতে পারে না';
$string['cannotdownloadcomponents'] = 'কম্পোনেন্ট ডাউনলোড করা যায় না';
$string['cannotdownloadzipfile'] = 'ZIP ফাইল ডাউনলোড করা যায়না';
$string['cannotfindcomponent'] = 'কম্পোনেন্ট খুঁজে পাওয়া যায় না';
$string['cannotsavemd5file'] = 'md5 ফাইল সংরক্ষণ করতে পারেনা';
$string['cannotsavezipfile'] = 'ZIP ফাইল সংরক্ষণ করতে পারেনা';
$string['cannotunzipfile'] = 'ফাইল আনজিপ করতে পারে না';
$string['componentisuptodate'] = 'কম্পোনেন্ট হালনাগাদ করা নেই';
$string['downloadedfilecheckfailed'] = 'ফাইল ডাউনলোড পরীক্ষা ব্যর্থ';
$string['invalidmd5'] = 'পরীক্ষন ভেরিয়েবল ভুল ছিল - পুনরায় চেষ্টা';
$string['missingrequiredfield'] = 'কিছু আবশ্যক ক্ষেত্র অনুপস্থিত';
$string['remotedownloaderror'] = 'আপনার সার্ভারে কম্পোনেন্ট ডাউনলোড ব্যর্থ, অনুগ্রহ করে প্রক্সি সেটিং পরীক্ষা, PHP cURL এক্সটেনশন খুব ভালোভাবে সুপারিশ করা হয়েছে।<br /><br />আপনার উচিত ফাইলটি নিজহাতে <a href="{$a->url}">{$a->url}</a> থেকে ডাউনলোড করে, আপনার সার্ভারে "{$a->dest}" এ এটা অনুলিপি এবং এটা এখানে আনজিপ করুন।';
$string['wrongdestpath'] = 'ভুল গন্তব্য পাথ';
$string['wrongsourcebase'] = 'ভুল সোর্স URL বেস';
$string['wrongzipfilename'] = 'ভুল ZIP ফাইল নাম';
Loading

0 comments on commit 5baeaa4

Please sign in to comment.