Merge branch 'wip-MDL-43026-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE

This commit is contained in:
Damyon Wiese
2013-12-03 16:12:27 +08:00
2 changed files with 22 additions and 16 deletions
@@ -1,4 +1,4 @@
@tool @tool_behat
@tool @tool_behat @_only_local
Feature: Set up contextual data for tests
In order to write tests quickly
As a developer
@@ -143,13 +143,29 @@ Feature: Set up contextual data for tests
| fullname | shortname |
| Course 1 | C1 |
And the following "activities" exists:
| activity | name | intro | course | idnumber |
| assign | Test assignment name | Test assignment description | C1 | assign1 |
| data | Test database name | Test database description | C1 | data1 |
| activity | name | intro | course | idnumber |
| assign | Test assignment name | Test assignment description | C1 | assign1 |
| assignment | Test assignment22 name | Test assignment22 description | C1 | assignment1 |
| data | Test database name | Test database description | C1 | data1 |
| forum | Test forum name | Test forum description | C1 | forum1 |
| label | Test label name | Test label description | C1 | label1 |
| lti | Test lti name | Test lti description | C1 | lti1 |
| page | Test page name | Test page description | C1 | page1 |
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
| resource | Test resource name | Test resource description | C1 | resource1 |
When I log in as "admin"
And I follow "Course 1"
Then I should see "Test assignment name"
# Assignment 2.2 is disabled by default:
# And I should see "Test assignment22 name"
And I should see "Test database name"
And I should see "Test forum name"
# User can see label description instead of name on the course page:
And I should see "Test label description"
And I should see "Test lti name"
And I should see "Test page name"
And I should see "Test quiz name"
And I should see "Test resource name"
And I follow "Test assignment name"
And I should see "Test assignment description"
+2 -12
View File
@@ -1184,16 +1184,10 @@ function fix_utf8($value) {
// No null bytes expected in our data, so let's remove it.
$value = str_replace("\0", '', $value);
// Lower error reporting because glibc throws bogus notices.
$olderror = error_reporting();
if ($olderror & E_NOTICE) {
error_reporting($olderror ^ E_NOTICE);
}
// Note: this duplicates min_fix_utf8() intentionally.
static $buggyiconv = null;
if ($buggyiconv === null) {
$buggyiconv = (!function_exists('iconv') or iconv('UTF-8', 'UTF-8//IGNORE', '100'.chr(130).'€') !== '100€');
$buggyiconv = (!function_exists('iconv') or @iconv('UTF-8', 'UTF-8//IGNORE', '100'.chr(130).'€') !== '100€');
}
if ($buggyiconv) {
@@ -1209,11 +1203,7 @@ function fix_utf8($value) {
}
} else {
$result = iconv('UTF-8', 'UTF-8//IGNORE', $value);
}
if ($olderror & E_NOTICE) {
error_reporting($olderror);
$result = @iconv('UTF-8', 'UTF-8//IGNORE', $value);
}
return $result;