language: php
php:
- # Moodle supports versions 5.4, 5.5, and 5.6 of PHP.
- # Order by fastest to slowest.
- # We currently only run the highest and lowest versions to reduce the load on travis-ci.org.
- - 5.6
+ # We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
+ - 7.0
+ # - 5.6
# - 5.5
- 5.4
- # We hope to offer PHP 7 support in the near future.
- - nightly
-
-services:
- # Ensure that memcached and mongodb are running for testing of those MUC stores.
- - memcached
- - mongodb
-
env:
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
# start first so that the total run time is not too high.
# It will not stop the jobs from running.
fast_finish: true
- # Always allow failure on nightly.
- # It's a nightly build and failures can happen.
- allow_failures:
- - php: nightly
-
exclude:
- # PHP 7 is not yet supported for actual runs.
- # Exclude it by default - we include it for CITEST only later.
- - php: nightly
-
# MySQL - it's just too slow.
- # Exclude it on all versions except for 5.6.
+ # Exclude it on all versions except for 7.0
+ # - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
+ # php: 5.6
+ #
# - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
# php: 5.5
- env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false
php: 5.4
- include:
- # Attempt to run the CITEST set on PHP 7.
- - php: nightly
- env: DB=none PHPUNIT=false INSTALL=false CITEST=true
-
cache:
directories:
- $HOME/.composer/cache
# Typically it should be able to use the Composer cache if any other job has already completed before we started here.
- travis_retry composer install --prefer-dist --no-interaction
- - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- - echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
-
before_script:
- >
if [ "$INSTALL" = 'true' -o "$PHPUNIT" = 'true' ];
sed -i \
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
- -e "/require_once/i define('TEST_CACHESTORE_MEMCACHE_TESTSERVERS', '127.0.0.1:11211');" \
- -e "/require_once/i define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211');" \
- -e "/require_once/i define('TEST_CACHESTORE_MONGODB_TESTSERVER', 'mongodb://localhost:27017');" \
config.php ;
# Initialise PHPUnit for Moodle.
export phpcmd=`which php`;
fi
- - >
- if [ "$CITEST" = "true" -a "$GIT_PREVIOUS_COMMIT" != "$UPSTREAM_FETCH_HEAD" ];
- then
- # This is a CI test, but it is based on an older weekly release.
- # Warn in a way that will fail the test.
- echo "Current commit is based on an older weekly release" && false;
- fi
-
# Actually run the CI Tests - do this outside of the main test to make output clearer.
- >
if [ "$CITEST" = 'true' ];
}
)
}
+ },
+ less: {
+ bootstrapbase: {
+ files: {
+ "theme/bootstrapbase/style/moodle.css": "theme/bootstrapbase/less/moodle.less",
+ "theme/bootstrapbase/style/editor.css": "theme/bootstrapbase/less/editor.less",
+ },
+ options: {
+ compress: true
+ }
+ }
}
});
grunt.task.run('shifter');
// Are we in an AMD directory?
} else if (path.basename(cwd) == 'amd') {
- grunt.task.run('jshint');
- grunt.task.run('uglify');
+ grunt.task.run('amd');
} else {
// Run them all!.
- grunt.task.run('shifter');
- grunt.task.run('jshint');
- grunt.task.run('uglify');
+ grunt.task.run('css');
+ grunt.task.run('js');
}
};
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-less');
- // Register the shifter task.
+ // Register JS tasks.
grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter);
+ grunt.registerTask('amd', ['jshint', 'uglify']);
+ grunt.registerTask('js', ['amd', 'shifter']);
+
+ // Register CSS taks.
+ grunt.registerTask('css', ['less:bootstrapbase']);
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.4.4" level="required">
- <RESTRICT function="restrict_php_version_7" message="unsupportedphpversion7" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
} else {
// Updating role.
$DB->update_record('role', $this->role);
+
+ // This will ensure the course contacts cache is purged so name changes get updated in
+ // the UI. It would be better to do this only when we know that fields affected are
+ // updated. But thats getting into the weeds of the coursecat cache and role edits
+ // should not be that frequent, so here is the ugly brutal approach.
+ coursecat::role_assignment_changed($this->role->id, context_system::instance());
}
// Assignable contexts.
// Add Calendar type settings.
if ($hassiteconfig) {
$ADMIN->add('modules', new admin_category('calendartype', new lang_string('calendartypes', 'calendar')));
- foreach (core_component::get_plugin_list_with_file('calendartype', 'settings.php') as $plugin => $settingspath) {
- $settings = new admin_settingpage('calendartype_' . $plugin . '_settings', new lang_string('pluginname', 'calendartype_' . $plugin), 'moodle/site:config');
- include($settingspath);
- $ADMIN->add('calendartype', $settings);
+ foreach (core_plugin_manager::instance()->get_plugins_of_type('calendartype') as $plugin) {
+ /** @var \core\plugininfo\calendartype $plugin */
+ $plugin->load_settings($ADMIN, 'calendartype', $hassiteconfig);
}
}
// Conditional activities: completion and availability
$optionalsubsystems->add(new admin_setting_configcheckbox('enablecompletion',
new lang_string('enablecompletion','completion'),
- new lang_string('configenablecompletion','completion'), 0));
+ new lang_string('configenablecompletion', 'completion'), 1));
$options = array(
1 => get_string('completionactivitydefault', 'completion'),
$optionalsubsystems->add($checkbox = new admin_setting_configcheckbox('enableavailability',
new lang_string('enableavailability', 'availability'),
- new lang_string('enableavailability_desc', 'availability'), 0));
+ new lang_string('enableavailability_desc', 'availability'), 1));
$checkbox->set_affects_modinfo(true);
$optionalsubsystems->add(new admin_setting_configcheckbox('enableplagiarism', new lang_string('enableplagiarism','plagiarism'), new lang_string('configenableplagiarism','plagiarism'), 0));
Scenario: Display list of availability conditions
# Check the report doesn't show when not enabled.
Given I log in as "admin"
+ And the following config values are set as admin:
+ | enableavailability | 0 |
And I expand "Site administration" node
When I expand "Plugins" node
Then I should not see "Availability restrictions"
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
- And the following config values are set as admin:
- | enableavailability | 1 |
And I log in as "admin"
And I am on site homepage
When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
And the following "grade categories" exist:
| fullname | course |
| Grade category 1 | C1 |
- And the following "grade items" exist:
- | itemname | course | outcome | gradecategory |
- | Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
+ And the following "grade items" exist:
+ | itemname | course | outcome | gradecategory |
+ | Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
And the following config values are set as admin:
| enableoutcomes | 1 |
When I log in as "admin"
And I expand all fieldsets
And "//div[contains(@class, 'fitem')]/div[contains(@class, 'fitemtitle')]/div[contains(@class, fstaticlabel) and contains(., 'Grade category')]/../../div[contains(@class, 'felement') and contains(., 'Grade category 1')]" "xpath_element" should exist
And I press "Cancel"
+
+ Scenario: Add a block
+ Given the following "courses" exist:
+ | fullname | shortname |
+ | Course 1 | C1 |
+ And the following "blocks" exist:
+ | blockname | contextlevel | reference | pagetypepattern | defaultregion |
+ | online_users | Course | C1 | course-view-* | site-pre |
+ When I log in as "admin"
+ And I am on site homepage
+ And I follow "Course 1"
+ Then I should see "Online users"
if (isset($USER->$key) and is_array($USER->$key)) {
// this must be some hacky field that is abusing arrays to store content and format
$user->$key = array();
- $user->$key['text'] = $value;
- $user->$key['format'] = FORMAT_MOODLE;
+ $user->{$key['text']} = $value;
+ $user->{$key['format']} = FORMAT_MOODLE;
} else {
$user->$key = trim($value);
}
-@core @core_admin @_file_upload
+@tool @tool_uploaduser @_file_upload
Feature: Upload users
In order to add users to the system
As an admin
And I follow "Groups"
And I set the field "groups" to "Section 1 (1)"
And the "members" select box should contain "Tom Jones"
+
+ @javascript
+ Scenario: Upload users with custom profile fields
+ # Create user profile field.
+ Given I log in as "admin"
+ And I navigate to "User profile fields" node in "Site administration > Users > Accounts"
+ And I set the field "datatype" to "Text area"
+ And I set the following fields to these values:
+ | Short name | superfield |
+ | Name | Super field |
+ And I click on "Save changes" "button"
+ # Upload users.
+ When I navigate to "Upload users" node in "Site administration > Users > Accounts"
+ And I upload "lib/tests/fixtures/upload_users_profile.csv" file to "File" filemanager
+ And I press "Upload users"
+ And I press "Upload users"
+ # Check that users were created and the superfield is filled.
+ And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
+ And I follow "Tom Jones"
+ And I should see "Super field"
+ And I should see "The big guy"
+ And I log out
/**
* Constructor.
*/
- function auth_plugin_cas() {
+ public function __construct() {
$this->authtype = 'cas';
$this->roleauth = 'auth_cas';
$this->errorlogtag = '[AUTH CAS] ';
$this->init_plugin($this->authtype);
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_cas() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
function prevent_local_passwords() {
return true;
}
require_once($CFG->libdir.'/password_compat/lib/password.php');
set_config('passtype', 'saltedcrypt', 'auth/db');
$auth->config->passtype = 'saltedcrypt';
- $user3->pass = password_hash('heslo', PASSWORD_BCRYPT, array('salt' => 'best_salt_ever_moodle_rocks_dont_tell'));
+ $user3->pass = password_hash('heslo', PASSWORD_BCRYPT);
$DB->update_record('auth_db_users', $user3);
$this->assertTrue($auth->user_login('u3', 'heslo'));
$this->cleanup_auth_database();
}
+
+ /**
+ * Testing the function _colonscope() from ADOdb.
+ */
+ public function test_adodb_colonscope() {
+ global $CFG;
+ require_once($CFG->libdir.'/adodb/adodb.inc.php');
+ require_once($CFG->libdir.'/adodb/drivers/adodb-odbc.inc.php');
+ require_once($CFG->libdir.'/adodb/drivers/adodb-db2ora.inc.php');
+
+ $this->resetAfterTest(false);
+
+ $sql = "select * from table WHERE column=:1 AND anothercolumn > :0";
+ $arr = array('b', 1);
+ list($sqlout, $arrout) = _colonscope($sql,$arr);
+ $this->assertEquals("select * from table WHERE column=? AND anothercolumn > ?", $sqlout);
+ $this->assertEquals(array(1, 'b'), $arrout);
+ }
}
/**
* Constructor.
*/
- function auth_plugin_email() {
+ public function __construct() {
$this->authtype = 'email';
$this->config = get_config('auth/email');
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_email() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
/**
* Constructor.
*/
- function auth_plugin_fc() {
+ public function __construct() {
$this->authtype = 'fc';
$this->config = get_config('auth/fc');
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_fc() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
var $_debug = FALSE; // set to true to see some debug info
// class constructor
- function fcFPP($host="localhost", $port="3333")
+ public function __construct($host="localhost", $port="3333")
{
$this->_hostname = $host;
$this->_port = $port;
$this->_pwd = "";
}
+ function fcFPP($host="localhost", $port="3333")
+ {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct($host, $port);
+ }
+
// open a connection to the FirstClass server
function open()
{
/**
* Constructor.
*/
- function auth_plugin_imap() {
+ public function __construct() {
$this->authtype = 'imap';
$this->config = get_config('auth/imap');
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_imap() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
/**
* Constructor with initialisation.
*/
- function auth_plugin_ldap() {
+ public function __construct() {
$this->authtype = 'ldap';
$this->roleauth = 'auth_ldap';
$this->errorlogtag = '[AUTH LDAP] ';
$this->init_plugin($this->authtype);
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_ldap() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
/**
* Constructor.
*/
- function auth_plugin_manual() {
+ public function __construct() {
$this->authtype = 'manual';
$config = get_config(self::COMPONENT_NAME);
$legacyconfig = get_config(self::LEGACY_COMPONENT_NAME);
$this->config = (object)array_merge((array)$legacyconfig, (array)$config);
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_manual() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist. (Non-mnet accounts only!)
/**
* Constructor.
*/
- function auth_plugin_mnet() {
+ public function __construct() {
$this->authtype = 'mnet';
$this->config = get_config('auth_mnet');
$this->mnet = get_mnet_environment();
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_mnet() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* This function is normally used to determine if the username and password
* are correct for local logins. Always returns false, as local users do not
/**
* Constructor.
*/
- function auth_plugin_nntp() {
+ public function __construct() {
$this->authtype = 'nntp';
$this->config = get_config('auth/nntp');
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_nntp() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
/**
* Constructor.
*/
- function auth_plugin_nologin() {
+ public function __construct() {
$this->authtype = 'nologin';
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_nologin() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Do not allow any login.
*
/**
* Constructor.
*/
- function auth_plugin_none() {
+ public function __construct() {
$this->authtype = 'none';
$this->config = get_config('auth/none');
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_none() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work or don't exist and false
* if the user exists and the password is wrong.
/**
* Constructor.
*/
- function auth_plugin_pam() {
+ public function __construct() {
$this->authtype = 'pam';
$this->config = get_config('auth/pam');
$this->errormessage = '';
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_pam() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
/**
* Constructor.
*/
- function auth_plugin_pop3() {
+ public function __construct() {
$this->authtype = 'pop3';
$this->config = get_config('auth/pop3');
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_pop3() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
/**
* Constructor.
*/
- function auth_plugin_radius() {
+ public function __construct() {
$this->authtype = 'radius';
$this->config = get_config('auth/radius');
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_radius() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
/**
* Constructor.
*/
- function auth_plugin_shibboleth() {
+ public function __construct() {
$this->authtype = 'shibboleth';
$this->config = get_config('auth/shibboleth');
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_shibboleth() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
/**
* Constructor.
*/
- function auth_plugin_webservice() {
+ public function __construct() {
$this->authtype = 'webservice';
$this->config = get_config('auth/webservice');
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function auth_plugin_webservice() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Returns true if the username and password work and false if they are
* wrong or don't exist.
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enableavailability | 1 |
- | enablecompletion | 1 |
@javascript
Scenario: Test condition
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
- And the following config values are set as admin:
- | enableavailability | 1 |
- | enablecompletion | 1 |
@javascript
Scenario: Multiple completion conditions on glossary
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enableavailability | 1 |
@javascript
Scenario: Test condition
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enableavailability | 1 |
@javascript
Scenario: Test condition
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enableavailability | 1 |
@javascript
Scenario: Test condition
And the following "group members" exist:
| user | group |
| student1 | GI1 |
- And the following config values are set as admin:
- | enableavailability | 1 |
@javascript
Scenario: Test condition
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enableavailability | 1 |
@javascript
Scenario: Test condition
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enableavailability | 1 |
@javascript
Scenario: Activity availability display
| student1 | C1 | student |
Scenario: Confirm the 'enable availability' option is working
+ Given the following config values are set as admin:
+ | enableavailability | 0 |
When I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
@javascript
Scenario: Edit availability using settings in activity form
# Set up.
- Given the following config values are set as admin:
- | enableavailability | 1 |
- And I log in as "teacher1"
+ Given I log in as "teacher1"
And I follow "Course 1"
# Add a Page and check it has None in so far.
@javascript
Scenario: Edit availability using settings in section form
# Set up.
- Given the following config values are set as admin:
- | enableavailability | 1 |
- And I log in as "teacher1"
+ Given I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
@javascript
Scenario: 'Add group/grouping access restriction' button unavailable
# Button does not exist when conditional access restrictions are turned off.
- Given I log in as "admin"
+ Given the following config values are set as admin:
+ | enableavailability | 0 |
+ And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
@javascript
Scenario: Use the 'Add group/grouping access restriction' button
# Button should initially be disabled.
- Given the following config values are set as admin:
- | enableavailability | 1 |
- And the following "groupings" exist:
+ Given the following "groupings" exist:
| name | course | idnumber |
| GX1 | C1 | GXI1 |
And I log in as "admin"
* Tests the info_module class (is_available, get_full_information).
*/
public function test_info_module() {
- global $DB;
+ global $DB, $CFG;
// Create a course and pages.
+ $CFG->enableavailability = 0;
$this->setAdminUser();
$this->resetAfterTest();
$generator = $this->getDataGenerator();
global $CFG, $DB;
require_once($CFG->dirroot . '/course/lib.php');
$this->resetAfterTest();
+ $CFG->enableavailability = 0;
// Create a course and some pages:
// 0. Invisible due to visible=0.
public function generate_moodle_xml () {
- global $CFG;
+ global $CFG, $OUTPUT;
$cdir = static::$path_to_manifest_folder . DIRECTORY_SEPARATOR . 'course_files';
} else {
$status = false;
- notify('The course is empty');
+ echo $OUTPUT->notification('The course is empty');
static::log_action('The course is empty', false);
}
private $css;
private $html;
- function cssparser($html = true) {
+ public function __construct($html = true) {
// Register "destructor"
core_shutdown_manager::register_function(array(&$this, "finalize"));
$this->html = ($html != false);
$this->Clear();
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function cssparser($html = true) {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct($html);
+ }
+
function finalize() {
unset($this->css);
}
}
return $result;
}
-}
\ No newline at end of file
+}
}
public function move_files($files, $destination_folder) {
- global $CFG;
+ global $CFG, $OUTPUT;
if (!empty($files)) {
}
if (!$copy_success) {
- notify('WARNING: Cannot copy the file ' . $source . ' to ' . $destination);
+ echo $OUTPUT->notification('WARNING: Cannot copy the file ' . $source . ' to ' . $destination);
cc2moodle::log_action('Cannot copy the file ' . $source . ' to ' . $destination, false);
}
}
require_once($CFG->dirroot . '/backup/cc/cc2moodle.php');
function cc_convert ($dir) {
+ global $OUTPUT;
$manifest_file = $dir . DIRECTORY_SEPARATOR . 'imsmanifest.xml';
$moodle_file = $dir . DIRECTORY_SEPARATOR . 'moodle.xml';
$detected_requirements = detect_requirements();
if (!$detected_requirements["php5"]) {
- notify(get_string('cc_import_req_php5', 'imscc'));
+ echo $OUTPUT->notification(get_string('cc_import_req_php5', 'imscc'));
return false;
}
if (!$detected_requirements["dom"]) {
- notify(get_string('cc_import_req_dom', 'imscc'));
+ echo $OUTPUT->notification(get_string('cc_import_req_dom', 'imscc'));
return false;
}
if (!$detected_requirements["libxml"]) {
- notify(get_string('cc_import_req_libxml', 'imscc'));
+ echo $OUTPUT->notification(get_string('cc_import_req_libxml', 'imscc'));
return false;
}
if (!$detected_requirements["libxmlminversion"]) {
- notify(get_string('cc_import_req_libxmlminversion', 'imscc'));
+ echo $OUTPUT->notification(get_string('cc_import_req_libxmlminversion', 'imscc'));
return false;
}
if (!$detected_requirements["xsl"]) {
- notify(get_string('cc_import_req_xsl', 'imscc'));
+ echo $OUTPUT->notification(get_string('cc_import_req_xsl', 'imscc'));
return false;
}
if (!$cc2moodle->is_auth()) {
return $cc2moodle->generate_moodle_xml();
} else {
- notify(get_string('cc2moodle_req_auth', 'imscc'));
+ echo $OUTPUT->notification(get_string('cc2moodle_req_auth', 'imscc'));
return false;
}
} else {
- notify(get_string('cc2moodle_invalid_schema', 'imscc'));
+ echo $OUTPUT->notification(get_string('cc2moodle_invalid_schema', 'imscc'));
return false;
}
} else {
- notify(get_string('cc2moodle_manifest_dont_load', 'imscc'));
+ echo $OUTPUT->notification(get_string('cc2moodle_manifest_dont_load', 'imscc'));
return false;
}
}
return $this->module . '-' . $this->action;
}
- public function process($log) {
+ public function process($inputlog) {
+
+ // There might be multiple rules that process this log, we can't alter it in the process of checking it.
+ $log = clone($inputlog);
// Reset the allpairs array
$this->allpairs = array();
}
// Arrived here log is empty, no rule was able to perform the conversion, log the problem
if (empty($newlog)) {
- self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored', backup::LOG_DEBUG);
+ self::$task->log('Log module-action "' . $keyname . '" process problem. Not restored. ' .
+ json_encode($log), backup::LOG_DEBUG);
}
} else { // Action not found log the problem
- self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored', backup::LOG_DEBUG);
+ self::$task->log('Log module-action "' . $keyname . '" unknown. Not restored. '.json_encode($log), backup::LOG_DEBUG);
$newlog = false;
}
--- /dev/null
+<?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/>.
+
+/**
+ * @package core_backup
+ * @category test
+ * @copyright 2015 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+// Include all the needed stuff
+global $CFG;
+require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
+
+
+class backup_restore_log_rule_testcase extends basic_testcase {
+
+ function test_process_keeps_log_unmodified() {
+
+ // Prepare a tiny log entry.
+ $originallog = new stdClass();
+ $originallog->url = 'original';
+ $originallog->info = 'original';
+ $log = clone($originallog);
+
+ // Process it with a tiny log rule, only modifying url and info.
+ $lr = new restore_log_rule('test', 'test', 'changed', 'changed');
+ $result = $lr->process($log);
+
+ // The log has been processed.
+ $this->assertEquals('changed', $result->url);
+ $this->assertEquals('changed', $result->info);
+
+ // But the original log has been kept unmodified by the process() call.
+ $this->assertEquals($originallog, $log);
+ }
+}
* @return void
*/
protected function add_subplugin_structure($subplugintype, $element, $multiple, $plugintype = null, $pluginname = null) {
+ global $CFG;
+ // This global declaration is required, because where we do require_once($backupfile);
+ // That file may in turn try to do require_once($CFG->dirroot ...).
+ // That worked in the past, we should keep it working.
// Verify if this is a BC call for an activity backup. See NOTE above for this special case.
if ($plugintype === null and $pluginname === null) {
* @return void
*/
protected function add_subplugin_structure($subplugintype, $element, $plugintype = null, $pluginname = null) {
+ global $CFG;
+ // This global declaration is required, because where we do require_once($backupfile);
+ // That file may in turn try to do require_once($CFG->dirroot ...).
+ // That worked in the past, we should keep it working.
// Verify if this is a BC call for an activity restore. See NOTE above for this special case.
if ($plugintype === null and $pluginname === null) {
} catch (exception $e) {
$this->assertTrue($e instanceof base_setting_exception);
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
+ } catch (TypeError $e) {
+ // On PHP7+ we get a TypeError raised, lets check we've the right error.
+ $this->assertRegexp('/must be an instance of backup_setting_ui/', $e->getMessage());
}
restore_error_handler();
} catch (exception $e) {
$this->assertTrue($e instanceof base_setting_exception);
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
+ } catch (TypeError $e) {
+ // On PHP7+ we get a TypeError raised, lets check we've the right error.
+ $this->assertRegexp('/must be an instance of backup_setting_ui/', $e->getMessage());
}
restore_error_handler();
} catch (exception $e) {
$this->assertTrue($e instanceof backup_setting_exception);
$this->assertEquals($e->errorcode, 'incorrect_object_passed');
+ } catch (TypeError $e) {
+ // On PHP7+ we get a TypeError raised, lets check we've the right error.
+ $this->assertRegexp('/must be an instance of base_setting/', $e->getMessage());
}
restore_error_handler();
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enablecompletion | 1 |
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Edit settings"
global $CFG;
$this->block = $block;
$this->page = $page;
- parent::moodleform($actionurl);
+ parent::__construct($actionurl);
}
function definition() {
$limitfrom = 0;
$limitnum = 1;
- $BROWSE = 'timemodified';
+ $orderby = 'timemodified ASC';
switch ($this->config->type) {
case BGR_RANDOMLY:
$i = rand(1,$numberofentries);
$limitfrom = $i-1;
- $SORT = 'ASC';
break;
case BGR_NEXTONE:
$i = 1;
}
$limitfrom = $i-1;
- $SORT = 'ASC';
break;
case BGR_NEXTALPHA:
- $BROWSE = 'concept';
+ $orderby = 'concept ASC';
if (isset($this->config->previous)) {
$i = $this->config->previous + 1;
} else {
$i = 1;
}
$limitfrom = $i-1;
- $SORT = 'ASC';
break;
default: // BGR_LASTMODIFIED
$i = $numberofentries;
$limitfrom = 0;
- $SORT = 'DESC';
+ $orderby = 'timemodified DESC, id DESC';
break;
}
if ($entry = $DB->get_records_sql("SELECT id, concept, definition, definitionformat, definitiontrust
FROM {glossary_entries}
WHERE glossaryid = ? AND approved = 1
- ORDER BY $BROWSE $SORT", array($this->config->glossary), $limitfrom, $limitnum)) {
+ ORDER BY $orderby", array($this->config->glossary), $limitfrom, $limitnum)) {
$entry = reset($entry);
*/
class block_online_users_generator extends testing_block_generator {
- /**
- * Create new block instance
- * @param array|stdClass $record
- * @param array $options
- * @return stdClass activity record with extra cmid field
- */
- public function create_instance($record = null, array $options = null) {
- global $DB, $CFG;
- require_once("$CFG->dirroot/mod/page/locallib.php");
-
- $this->instancecount++;
-
- $record = (object)(array)$record;
- $options = (array)$options;
-
- $record = $this->prepare_record($record);
-
- $id = $DB->insert_record('block_instances', $record);
- context_block::instance($id);
-
- $instance = $DB->get_record('block_instances', array('id'=>$id), '*', MUST_EXIST);
-
- return $instance;
- }
-
/**
* Create (simulated) logged in users and add some of them to groups in a course
*/
| GG3 | G2 |
Scenario: Check that Added module information is displayed respecting view capability
- Given the following config values are set as admin:
- | enableavailability | 1 |
- And I log in as "teacher1"
+ Given I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
When I add a "Forum" to section "1" and I fill the form with:
function __construct($actionurl, $isadding, $caneditshared) {
$this->isadding = $isadding;
$this->caneditshared = $caneditshared;
- parent::moodleform($actionurl);
+ parent::__construct($actionurl);
}
function definition() {
* than the current time the attempt is skipped.
*/
public function test_skip() {
- global $DB;
+ global $DB, $CFG;
$this->resetAfterTest();
// Create a RSS feed record with a skip until time set to the future.
$record = (object) array(
$block = new block_rss_client();
ob_start();
+
// Silence SimplePie php notices.
- @$block->cron();
+ $errorlevel = error_reporting($CFG->debug & ~E_USER_NOTICE);
+ $block->cron();
+ error_reporting($errorlevel);
+
$cronoutput = ob_get_clean();
$this->assertContains('skipping until ' . userdate($record->skipuntil), $cronoutput);
$this->assertContains('0 feeds refreshed (took ', $cronoutput);
* Test that when a feed has an error the skip time is increaed correctly.
*/
public function test_error() {
- global $DB;
+ global $DB, $CFG;
$this->resetAfterTest();
$time = time();
// A record that has failed before.
// Run the cron.
$block = new block_rss_client();
ob_start();
+
// Silence SimplePie php notices.
- @$block->cron();
+ $errorlevel = error_reporting($CFG->debug & ~E_USER_NOTICE);
+ $block->cron();
+ error_reporting($errorlevel);
+
$cronoutput = ob_get_clean();
$skiptime1 = $record->skiptime * 2;
$message1 = 'http://example.com/rss Error: could not load/find the RSS feed - skipping for ' . $skiptime1 . ' seconds.';
// Output edit mode title.
echo $OUTPUT->heading($strblogs . ': ' . get_string('deleteentry', 'blog'), 2);
+ echo $OUTPUT->confirm(get_string('blogdeleteconfirm', 'blog', format_string($entry->subject)),
+ new moodle_url('edit.php', $optionsyes),
+ new moodle_url('index.php', $optionsno));
+
+ echo '<br />';
// Output the entry.
$entry->prepare_render();
echo $output->render($entry);
- echo '<br />';
- echo $OUTPUT->confirm(get_string('blogdeleteconfirm', 'blog'),
- new moodle_url('edit.php', $optionsyes),
- new moodle_url('index.php', $optionsno));
echo $OUTPUT->footer();
die;
}
public function validation($data, $files) {
global $CFG, $DB, $USER;
- $errors = array();
+ $errors = parent::validation($data, $files);
// Validate course association.
if (!empty($data['courseassoc'])) {
$userid = $entry->userid;
}
-if (isset($userid) && !isset($courseid)) {
+if (isset($userid) && empty($courseid)) {
$context = context_user::instance($userid);
-} else if (isset($courseid) && $courseid != SITEID) {
+} else if (!empty($courseid) && $courseid != SITEID) {
$context = context_course::instance($courseid);
} else {
$context = context_system::instance();
--- /dev/null
+@core @core_blog
+Feature: Delete a blog entry
+ In order to manage my blog entries
+ As a user
+ I need to be able to delete entries I no longer wish to appear
+
+ Background:
+ Given the following "users" exist:
+ | username | firstname | lastname | email |
+ | testuser | Test | User | moodle@example.com |
+ And I log in as "testuser"
+ And I expand "Site pages" node
+ And I follow "Site blogs"
+ And I follow "Add a new entry"
+ And I set the following fields to these values:
+ | Entry title | Blog post one |
+ | Blog entry body | User 1 blog post content |
+ And I press "Save changes"
+ And I follow "Add a new entry"
+ And I set the following fields to these values:
+ | Entry title | Blog post two |
+ | Blog entry body | User 1 blog post content |
+ And I press "Save changes"
+ And I am on site homepage
+ And I expand "Site pages" node
+ And I follow "Site blogs"
+
+ Scenario: Delete blog post results in post deleted
+ Given I follow "Blog post one"
+ And I follow "Delete"
+ And I should see "Delete the blog entry 'Blog post one'?"
+ When I press "Continue"
+ Then I should not see "Blog post one"
+ And I should see "Blog post two"
+
+ Scenario: Delete confirmation screen works and allows cancel
+ Given I follow "Blog post one"
+ When I follow "Delete"
+ Then I should see "Delete the blog entry 'Blog post one'?"
+ And I press "Cancel"
+ And I should see "Blog post one"
+ And I should see "Blog post two"
+
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enablecompletion | 1 |
- | enableavailability | 1 |
And I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enableavailability | 1 |
And I log in as "teacher1"
And I am on site homepage
And I follow "Course 1"
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enableavailability | 1 |
And I log in as "teacher1"
#And I am on site homepage
And I follow "Course 1"
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
- And the following config values are set as admin:
- | enablecompletion | 1 |
- | enableavailability | 1 |
@javascript
Scenario: Show section greyed-out to student when completion condition is not satisfied
| user | course | role |
| student1 | CC1 | student |
| teacher1 | CC1 | editingteacher |
- And the following config values are set as admin:
- | enablecompletion | 1 |
And I log in as "admin"
- And I set the following administration settings values:
- | Enable completion tracking | 1 |
And I am on site homepage
And I follow "Completion course"
And completion tracking is "Enabled" in current course
And I follow "View course report"
And I should see "Student First"
And I follow "Click to mark user complete"
- # Running cron just after clicking sometimes fail, so navigate back
- # and ensure the student completion is updated before running cron.
- And I am on site homepage
- And I follow "Completion course"
- And I follow "View course report"
- And "//img[contains(@alt, 'Completed')]" "xpath_element" should exist in the "student1" "table_row"
+ # Running cron just after clicking sometimes fail, as record
+ # should be created before the cron runs.
+ And I wait "1" seconds
And I trigger cron
And I am on site homepage
And I log out
$options[0] = get_string('none');
$mform->addElement('select', 'defaultgroupingid', get_string('defaultgrouping', 'group'), $options);
- // Customizable role names in this course.
- $mform->addElement('header','rolerenaming', get_string('rolerenaming'));
- $mform->addHelpButton('rolerenaming', 'rolerenaming');
-
- if ($roles = get_all_roles()) {
- $roles = role_fix_names($roles, null, ROLENAME_ORIGINAL);
- $assignableroles = get_roles_for_contextlevels(CONTEXT_COURSE);
- foreach ($roles as $role) {
- $mform->addElement('text', 'role_'.$role->id, get_string('yourwordforx', '', $role->localname));
- $mform->setType('role_'.$role->id, PARAM_TEXT);
+ if ((empty($course->id) && guess_if_creator_will_have_course_capability('moodle/course:renameroles', $categorycontext))
+ || (!empty($course->id) && has_capability('moodle/course:renameroles', $coursecontext))) {
+ // Customizable role names in this course.
+ $mform->addElement('header', 'rolerenaming', get_string('rolerenaming'));
+ $mform->addHelpButton('rolerenaming', 'rolerenaming');
+
+ if ($roles = get_all_roles()) {
+ $roles = role_fix_names($roles, null, ROLENAME_ORIGINAL);
+ $assignableroles = get_roles_for_contextlevels(CONTEXT_COURSE);
+ foreach ($roles as $role) {
+ $mform->addElement('text', 'role_' . $role->id, get_string('yourwordforx', '', $role->localname));
+ $mform->setType('role_' . $role->id, PARAM_TEXT);
+ }
}
}
* @return bool whether section was deleted
*/
function course_delete_section($course, $section, $forcedeleteifnotempty = true) {
- return course_get_format($course)->delete_section($section, $forcedeleteifnotempty);
+ global $DB;
+
+ // Prepare variables.
+ $courseid = (is_object($course)) ? $course->id : (int)$course;
+ $sectionnum = (is_object($section)) ? $section->section : (int)$section;
+ $section = $DB->get_record('course_sections', array('course' => $courseid, 'section' => $sectionnum));
+ if (!$section) {
+ // No section exists, can't proceed.
+ return false;
+ }
+ $format = course_get_format($course);
+ $sectionname = $format->get_section_name($section);
+
+ // Delete section.
+ $result = $format->delete_section($section, $forcedeleteifnotempty);
+
+ // Trigger an event for course section deletion.
+ if ($result) {
+ $context = context_course::instance($courseid);
+ $event = \core\event\course_section_deleted::create(
+ array(
+ 'objectid' => $section->id,
+ 'courseid' => $courseid,
+ 'context' => $context,
+ 'other' => array(
+ 'sectionnum' => $section->section,
+ 'sectionname' => $sectionname,
+ )
+ )
+ );
+ $event->add_record_snapshot('course_sections', $section);
+ $event->trigger();
+ }
+ return $result;
}
/**
$rolename->name = $value;
$DB->insert_record('role_names', $rolename);
}
+ // This will ensure the course contacts cache is purged..
+ coursecat::role_assignment_changed($roleid, $context);
}
}
$optionsyes = array('confirm'=>1, 'delete'=>$cm->id, 'sesskey'=>sesskey(), 'sr' => $sectionreturn);
$strdeletecheck = get_string('deletecheck', '', $fullmodulename);
- $strdeletecheckfull = get_string('deletecheckfull', '', "$fullmodulename '$cm->name'");
+ $strparams = (object)array('type' => $fullmodulename, 'name' => $cm->name);
+ $strdeletechecktypename = get_string('deletechecktypename', '', $strparams);
$PAGE->set_pagetype('mod-' . $cm->modname . '-delete');
$PAGE->set_title($strdeletecheck);
echo $OUTPUT->box_start('noticebox');
$formcontinue = new single_button(new moodle_url("$CFG->wwwroot/course/mod.php", $optionsyes), get_string('yes'));
$formcancel = new single_button($return, get_string('no'), 'get');
- echo $OUTPUT->confirm($strdeletecheckfull, $formcontinue, $formcancel);
+ echo $OUTPUT->confirm($strdeletechecktypename, $formcontinue, $formcancel);
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
/** @var object The course format of the current course. */
protected $courseformat;
- function moodleform_mod($current, $section, $cm, $course) {
+ public function __construct($current, $section, $cm, $course) {
global $CFG;
$this->current = $current;
}
$this->_modname = $matches[1];
$this->init_features();
- parent::moodleform('modedit.php');
+ parent::__construct('modedit.php');
+ }
+
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function moodleform_mod($current, $section, $cm, $course) {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct($current, $section, $cm, $course);
}
protected function init_features() {
Given the following "courses" exist:
| fullname | shortname | enablecompletion |
| Course 1 | C1 | 1 |
- And the following config values are set as admin:
- | enablecompletion | 1 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
--- /dev/null
+@core @core_course
+Feature: Rename roles in a course
+ In order to account for course-level differences
+ As a teacher
+ I need to be able to rename roles
+
+ Background:
+ Given the following "users" exist:
+ | username | firstname | lastname | email |
+ | student1 | Student | 1 | student1@example.com |
+ | teacher1 | Teacher | 1 | teacher1@example.com |
+ And the following "courses" exist:
+ | fullname | shortname |
+ | Course 1 | C1 |
+ And the following "course enrolments" exist:
+ | user | course | role |
+ | student1 | C1 | student |
+ | teacher1 | C1 | editingteacher |
+
+ Scenario: Teacher can rename roles
+ Given I log in as "teacher1"
+ And I follow "Course 1"
+ And I click on "Edit settings" "link" in the "Administration" "block"
+ And I should see "Role renaming"
+ When I set the following fields to these values:
+ | Your word for 'Teacher' | Lecturer |
+ | Your word for 'Student' | Learner |
+ And I press "Save and display"
+ And I navigate to "Enrolled users" node in "Course administration > Users"
+ Then I should see "Lecturer" in the "Teacher 1" "table_row"
+ And I should see "Learner" in the "Student 1" "table_row"
+
+ Scenario: Ability to rename roles can be prevented
+ Given I log in as "admin"
+ And I set the following system permissions of "Teacher" role:
+ | capability | permission |
+ | moodle/course:renameroles | Inherit |
+ And I follow "Log out"
+ When I log in as "teacher1"
+ And I follow "Course 1"
+ And I click on "Edit settings" "link" in the "Administration" "block"
+ Then I should not see "Role renaming"
+ And I should not see "Your word for 'Teacher'"
$this->assertEventContextNotUsed($event);
}
+ /**
+ * Test that triggering a course_section_deleted event works as expected.
+ */
+ public function test_course_section_deleted_event() {
+ global $USER, $DB;
+ $this->resetAfterTest();
+ $sink = $this->redirectEvents();
+
+ // Create the course with sections.
+ $course = $this->getDataGenerator()->create_course(array('numsections' => 10), array('createsections' => true));
+ $sections = $DB->get_records('course_sections', array('course' => $course->id));
+ $coursecontext = context_course::instance($course->id);
+ $section = array_pop($sections);
+ course_delete_section($course, $section);
+ $events = $sink->get_events();
+ $event = array_pop($events); // Delete section event.
+ $sink->close();
+
+ // Validate event data.
+ $this->assertInstanceOf('\core\event\course_section_deleted', $event);
+ $this->assertEquals('course_sections', $event->objecttable);
+ $this->assertEquals($section->id, $event->objectid);
+ $this->assertEquals($course->id, $event->courseid);
+ $this->assertEquals($coursecontext->id, $event->contextid);
+ $this->assertEquals($section->section, $event->other['sectionnum']);
+ $expecteddesc = "The user with id '{$event->userid}' deleted section number '{$event->other['sectionnum']}' " .
+ "(section name '{$event->other['sectionname']}') for the course with id '{$event->courseid}'";
+ $this->assertEquals($expecteddesc, $event->get_description());
+ $this->assertEquals($section, $event->get_record_snapshot('course_sections', $event->objectid));
+ $this->assertNull($event->get_url());
+
+ // Test legacy data.
+ $sectionnum = $section->section;
+ $expectedlegacydata = array($course->id, "course", "delete section", 'view.php?id=' . $course->id, $sectionnum);
+ $this->assertEventLegacyLogData($expectedlegacydata, $event);
+ $this->assertEventContextNotUsed($event);
+ }
+
public function test_course_integrity_check() {
global $DB;
$this->assertEquals($course2['forcetheme'], $courseinfo->theme);
}
- if (completion_info::is_enabled_for_site()) {
- $this->assertEquals($course2['enabledcompletion'], $courseinfo->enablecompletion);
- }
+ $this->assertEquals($course2['enablecompletion'], $courseinfo->enablecompletion);
} else if ($course['id'] == $course1['id']) {
$this->assertEquals($course1['fullname'], $courseinfo->fullname);
$this->assertEquals($course1['shortname'], $courseinfo->shortname);
FROM {enrol} e
JOIN {course} c ON c.id = e.courseid
JOIN {role_assignments} ra ON ra.itemid = e.id
- LEFT JOIN {user_enrolments} ue ON ue.enrolid = e.id
+ LEFT JOIN {user_enrolments} ue ON ue.enrolid = e.id AND ue.userid = ra.userid
WHERE ra.userid = :userid AND e.enrol = 'database'";
- $rs = $DB->get_recordset_sql($sql, array('userid'=>$user->id));
+ $rs = $DB->get_recordset_sql($sql, array('userid' => $user->id));
foreach ($rs as $instance) {
if (!$instance->cvisible and $ignorehidden) {
continue;
* onlyactive (integer) return only users with active enrolments and matching time restrictions. This option requires \'moodle/course:enrolreview\' on the course context.
* userfields (\'string, string, ...\') return only the values of these user fields.
* limitfrom (integer) sql limit from.
- * limitnumber (integer) maximum number of returned users.', VALUE_DEFAULT, array()),
+ * limitnumber (integer) maximum number of returned users.
+ * sortby (string) sort by id, firstname or lastname. For ordering like the site does, use siteorder.
+ * sortdirection (string) ASC or DESC',
+ VALUE_DEFAULT, array()),
)
);
}
$userfields = array();
$limitfrom = 0;
$limitnumber = 0;
+ $sortby = 'us.id';
+ $sortparams = array();
+ $sortdirection = 'ASC';
foreach ($options as $option) {
switch ($option['name']) {
case 'withcapability':
case 'limitnumber' :
$limitnumber = clean_param($option['value'], PARAM_INT);
break;
+ case 'sortby':
+ $sortallowedvalues = array('id', 'firstname', 'lastname', 'siteorder');
+ if (!in_array($option['value'], $sortallowedvalues)) {
+ throw new invalid_parameter_exception('Invalid value for sortby parameter (value: ' . $option['value'] . '),' .
+ 'allowed values are: ' . implode(',', $sortallowedvalues));
+ }
+ if ($option['value'] == 'siteorder') {
+ list($sortby, $sortparams) = users_order_by_sql('us');
+ } else {
+ $sortby = 'us.' . $option['value'];
+ }
+ break;
+ case 'sortdirection':
+ $sortdirection = strtoupper($option['value']);
+ $directionallowedvalues = array('ASC', 'DESC');
+ if (!in_array($sortdirection, $directionallowedvalues)) {
+ throw new invalid_parameter_exception('Invalid value for sortdirection parameter
+ (value: ' . $sortdirection . '),' . 'allowed values are: ' . implode(',', $directionallowedvalues));
+ }
+ break;
}
}
FROM {user} u $ctxjoin $groupjoin
WHERE u.id IN ($enrolledsql)
) q ON q.id = us.id
- ORDER BY us.id ASC";
+ ORDER BY $sortby $sortdirection";
+ $enrolledparams = array_merge($enrolledparams, $sortparams);
$enrolledusers = $DB->get_recordset_sql($sql, $enrolledparams, $limitfrom, $limitnumber);
$users = array();
foreach ($enrolledusers as $user) {
This files describes API changes in /enrol/* - plugins,
information provided here is intended especially for developers.
+=== 3.1 ===
+* core_enrol_external::get_enrolled_users now supports two additional parameters for ordering: sortby and sortdirection.
+
=== 3.0 ===
* Added new events enrol_instance_created, enrol_instance_updated and
public function __construct($submiturl, $filter, $context) {
$this->filter = $filter;
$this->context = $context;
- parent::moodleform($submiturl);
+ parent::__construct($submiturl);
}
/**
* external 'helper' binaries.
* Other platforms could/should be added
*/
- function latex() {
+ public function __construct() {
global $CFG;
// construct directory structure
make_temp_directory('latex');
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function latex() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
/**
* Accessor function for support_platform field.
* @return boolean value of supported_platform
/**
* Constructor - creates the buffer and initialises the time stamp
*/
- public function grade_export_update_buffer() {
+ public function __construct() {
$this->update_list = array();
$this->export_time = time();
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function grade_export_update_buffer() {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct();
+ }
+
public function flush($buffersize) {
global $CFG, $DB;
* @param string $elementlabel
* @param array $attributes
*/
+ public function __construct($elementname=null, $elementlabel=null, $attributes=null) {
+ parent::__construct($elementname, $elementlabel, $attributes);
+ }
+
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
public function moodlequickform_guideeditor($elementname=null, $elementlabel=null, $attributes=null) {
- parent::HTML_QuickForm_input($elementname, $elementlabel, $attributes);
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct($elementname, $elementlabel, $attributes);
}
/**
* @param string $elementLabel
* @param array $attributes
*/
- function MoodleQuickForm_rubriceditor($elementName=null, $elementLabel=null, $attributes=null) {
- parent::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
+ public function __construct($elementName=null, $elementLabel=null, $attributes=null) {
+ parent::__construct($elementName, $elementLabel, $attributes);
+ }
+
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function MoodleQuickForm_rubriceditor($elementName=null, $elementLabel=null, $attributes=null) {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct($elementName, $elementLabel, $attributes);
}
/**
*
* @param array $params - associative array with return parameters, if null parameter are taken from _GET or _POST
*/
- public function grade_plugin_return($params = null) {
+ public function __construct($params = null) {
if (empty($params)) {
$this->type = optional_param('gpr_type', null, PARAM_SAFEDIR);
$this->plugin = optional_param('gpr_plugin', null, PARAM_PLUGIN);
}
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function grade_plugin_return($params = null) {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct($params);
+ }
+
/**
* Returns return parameters as options array suitable for buttons.
* @return array options
* @param bool $category_grade_last category grade item is the last child
* @param bool $nooutcomes Whether or not outcomes should be included
*/
- public function grade_seq($courseid, $category_grade_last=false, $nooutcomes=false) {
+ public function __construct($courseid, $category_grade_last=false, $nooutcomes=false) {
global $USER, $CFG;
$this->courseid = $courseid;
}
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function grade_seq($courseid, $category_grade_last=false, $nooutcomes=false) {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct($courseid, $category_grade_last, $nooutcomes);
+ }
+
/**
* Static recursive helper - makes the grade_item for category the last children
*
* @param array $collapsed array of collapsed categories
* @param bool $nooutcomes Whether or not outcomes should be included
*/
- public function grade_tree($courseid, $fillers=true, $category_grade_last=false,
+ public function __construct($courseid, $fillers=true, $category_grade_last=false,
$collapsed=null, $nooutcomes=false) {
global $USER, $CFG, $COURSE, $DB;
}
+ /**
+ * Old syntax of class constructor. Deprecated in PHP7.
+ *
+ * @deprecated since Moodle 3.1
+ */
+ public function grade_tree($courseid, $fillers=true, $category_grade_last=false,
+ $collapsed=null, $nooutcomes=false) {
+ debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
+ self::__construct($courseid, $fillers, $category_grade_last, $collapsed, $nooutcomes);
+ }
+
/**
* Static recursive helper - removes items from collapsed categories
*
if ($userid == $USER->id) {
$settings = $PAGE->settingsnav->find('mygrades', null);
$settings->make_active();
-} else if ($courseid != SITEID) {
+} else if ($courseid != SITEID && $userid) {
// Show some other navbar thing.
- $user = $DB->get_record('user', array('id' => $userid));
+ $user = $DB->get_record('user', array('id' => $userid), '*', MUST_EXIST);
$PAGE->navigation->extend_for_user($user);
}
'value' => $this->selected
);
- $attributes = array();
+ $attributes = array('tabindex' => '1');
if (!empty($this->isdisabled)) {
$attributes['disabled'] = 'DISABLED';
$label = '';
if (preg_match("/^feedback/", $this->name)) {
$labeltitle = get_string('feedbackfor', 'gradereport_singleview', $this->label);
+ $attributes['tabindex'] = '2';
$label = html_writer::tag('label', $labeltitle, array('for' => $this->name, 'class' => 'accesshide'));
} else if (preg_match("/^finalgrade/", $this->name)) {
$labeltitle = get_string('gradefor', 'gradereport_singleview', $this->label);
+ $attributes['tabindex'] = '1';
$label = html_writer::tag('label', $labeltitle, array('for' => $this->name, 'class' => 'accesshide'));
}
M.gradereport_singleview = {};
M.gradereport_singleview.init = function(Y) {
+ var getColumnIndex = function(cell) {
+ var rowNode = cell.ancestor('tr');
+ if (!rowNode || !cell) {
+ return;
+ }
+ var cells = rowNode.all('td, th');
+ return cells.indexOf(cell);
+ },
+ getNextCell = function(cell) {
+ var n = cell || document.activeElement,
+ next = n.next('td.cell, th.cell');
+ if (!next) {
+ return null;
+ }
+ // Continue on until we find a navigable cell
+ if (!next || !Y.one(next).one('input:not([type="hidden"]):not([disabled="DISABLED"]), select, a')) {
+ return getNextCell(next);
+ }
+ return next;
+ },
+ getPrevCell = function(cell) {
+ var n = cell || document.activeElement,
+ next = n.previous('td.cell, th.cell');
+ if (!next) {
+ return null;
+ }
+ // Continue on until we find a navigable cell
+ if (!Y.one(next).one('input:not([type="hidden"]):not([disabled="DISABLED"]), select, a')) {
+ return getPrevCell(next);
+ }
+ return next;
+ },
+ getAboveCell = function(cell) {
+ var n = cell || document.activeElement,
+ tr = n.ancestor('tr').previous('tr'),
+ columnIndex = getColumnIndex(n),
+ next = null;
+ if (tr) {
+ next = tr.all('td, th').item(columnIndex);
+ } else {
+ return null;
+ }
+ // Continue on until we find a navigable cell
+ if (!Y.one(next).one('input:not([type="hidden"]):not([disabled="DISABLED"]), select, a')) {
+ return getAboveCell(next);
+ }
+ return next;
+ },
+ getBelowCell = function(cell) {
+ var n = cell || document.activeElement,
+ tr = n.ancestor('tr').next('tr'),
+ columnIndex = getColumnIndex(n),
+ next = null;
+ if (tr) {
+ next = tr.all('td, th').item(columnIndex);
+ } else {
+ return null;
+ }
+ // Continue on until we find a navigable cell
+ if (!Y.one(next).one('input:not([type="hidden"]):not([disabled="DISABLED"]), select, a')) {
+ return getBelowCell(next);
+ }
+ return next;
+ };
+
+ // Add ctrl+arrow controls for navigation
+ Y.one(Y.config.doc.body).delegate('key', function(e) {
+ e.preventDefault();
+ e.stopPropagation();
+ var next = null;
+ switch (e.keyCode) {
+ case 37:
+ next = getPrevCell(this.ancestor('td, th'));
+ break;
+ case 38:
+ next = getAboveCell(this.ancestor('td, th'));
+ break;
+ case 39:
+ next = getNextCell(this.ancestor('td, th'));
+ break;
+ case 40:
+ next = getBelowCell(this.ancestor('td, th'));
+ break;
+ }
+ if (next) {
+ Y.one(next).one('input:not([type="hidden"]):not([disabled="DISABLED"]), select, a').focus();
+ }
+ return;
+ }, 'down:37,38,39,40+ctrl', 'table input, table select, table a');
+
// Make toggle links
Y.all('.include').each(function(link) {
var type = link.getAttribute('class').split(" ")[2];
// MDL-43839 IE9 cannot handle all of our css.
// Once IE9 is no longer supported we can include 'bootstrapbase/style/moodle.css'
// and remove some of the CSS in $content.
-$files = array('');
+$files = array();
$content = '';
$string['cliincorrectvalueerror'] = 'Грешка, некоректна стойност "{$a->value}" за "{$a->option}"';
$string['cliincorrectvalueretry'] = 'Неправилна стойност. Моля опитайте отново';
$string['clitypevalue'] = 'Тип стойност';
+$string['clitypevaluedefault'] = 'въведете стойност, натиснете Enter за да се използва стойността по подразбиране ({$a})';
$string['cliyesnoprompt'] = 'Въведете y (означава да) или n (означава не)';
$string['environmentrequireinstall'] = 'Трябва да бъде инсталиран и разрешен';
$string['environmentrequireversion'] = 'Необходима е версия {$a->needed} а Вие имате {$a->current}';
$string['phpversionhelp'] = '<p>Moodle vyžaduje PHP alespoň verze 4.3.0 nebo 5.1.0 (PHP 5.0.x obsahuje množství chyb).</p>
<p>Nyní používáte PHP verze {$a}.</p>
<p>Musíte PHP upgradovat, nebo přejít k hostiteli s vyšší verzí!<br />
-(U PHP 5.0.x můžete také přejít na nižší verzi 4.4.x či 4.3.x.)</p>';
+(U PHP 5.0.x můžete také přejít na nižší verzi 4.4.x )</p>';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'Podařilo se vám úspěšně nainstalovat a spustit balíček <strong>{$a->packname} {$a->packversion}</strong>. Gratulujeme!';
$string['welcomep30'] = '<strong>{$a->installername}</strong> obsahuje aplikace k vytvoření prostředí, ve kterém bude provozován váš <strong>Moodle</strong>. Jmenovitě se jedná o:';
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Jazyk';
+$string['moodlelogo'] = 'Moodle logo';
$string['next'] = 'Další';
$string['previous'] = 'Předchozí';
$string['reload'] = 'Obnovit';
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Hizkuntza';
+$string['moodlelogo'] = 'Moodle-ren logoa';
$string['next'] = 'Hurrengoa';
$string['previous'] = 'Aurrekoa';
$string['reload'] = 'Berriz kargatu';
"{$a->value}" עבור "{$a->option}"';
$string['cliincorrectvalueretry'] = 'ערך שגוי, נסה שנית';
$string['clitypevalue'] = 'סוג הערך';
-$string['clitypevaluedefault'] = 'ס×\95×\92 ×\94ער×\9a, ×\94קש Enter ×\9cש×\99×\9e×\95ש ×\91ער×\9a ×\91ר×\99רת מחדל ({$a})';
+$string['clitypevaluedefault'] = '×\99ש ×\9c×\94×\96×\99×\9f ער×\9a, ×\90×\95 ×\9c×\94×§×\99ש ×¢×\9c ×\9bפת×\95ר Enter ×\9cש×\99×\9e×\95ש ×\91ער×\9a ×\91ררת־×\94מחדל ({$a})';
$string['cliunknowoption'] = 'אפשרויות לא מוכרות :
{$a}
אנא השתמש באפשרות העזרה.';
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Lingua';
+$string['moodlelogo'] = 'Logo Moodle';
$string['next'] = 'Successivo';
$string['previous'] = 'Precedente';
$string['reload'] = 'Ricarica';
defined('MOODLE_INTERNAL') || die();
$string['admindirname'] = 'Administratoriaus katalogas';
-$string['availablelangs'] = 'Galimų kalbų sąrašas';
+$string['availablelangs'] = 'Galimi kalbų paketai';
$string['chooselanguagehead'] = 'Pasirinkite kalbą';
$string['chooselanguagesub'] = 'Pasirinkite diegimo kalbą. Ši kalba bus naudojama ir kaip numatytoji svetainės kalba, nors vėliau ją bus galima pakeisti.';
$string['clialreadyconfigured'] = 'Failas config.php jau yra, prašau naudoti admin/cli/install_database.php jei norite įrašyti šią svetainę.';
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Språk';
+$string['moodlelogo'] = 'Moodlelogo';
$string['next'] = 'Neste';
$string['previous'] = 'Forrige';
$string['reload'] = 'Last på nytt';
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Język';
+$string['moodlelogo'] = 'Logo Moodle';
$string['next'] = 'Dalej';
$string['previous'] = 'Poprzedni';
$string['reload'] = 'Odśwież';
$string['cliyesnoprompt'] = 'introduceţi d (pentru \'da\') sau \'n\' (pentru \'nu\')';
$string['environmentrequireinstall'] = 'trebuie instalat şi activat';
$string['environmentrequireversion'] = 'versiuna necesară este {$a->needed} în timp ce dumneavoastră rulaţi versiunea {$a->current}';
+$string['upgradekeyset'] = 'Actualizează cheie (lăsați gol pentru a nu fi setat)';
defined('MOODLE_INTERNAL') || die();
$string['language'] = 'Limba';
+$string['moodlelogo'] = 'Logo Moodle';
$string['next'] = 'Următorul';
$string['previous'] = 'Precedent';
$string['reload'] = 'Reîncarcă';
$string['cliyesnoprompt'] = '输入y(表示是)或n(表示否)';
$string['environmentrequireinstall'] = '必须安装并启用';
$string['environmentrequireversion'] = '需要 {$a->needed} 版本,而您的是 {$a->current}';
+$string['upgradekeyset'] = '升级密码(若不要设定请保持空白)';
defined('MOODLE_INTERNAL') || die();
$string['language'] = '语言';
+$string['moodlelogo'] = 'Moodle图标';
$string['next'] = '向后';
$string['previous'] = '向前';
$string['reload'] = '重新载入';
$string['requiremodintro'] = 'Require activity description';
$string['requiremodintro_desc'] = 'If enabled, users will be forced to enter a description for each activity.';
$string['requires'] = 'Requires';
-$string['purgecaches']= 'Purge all caches';
-$string['purgecachesconfirm']= 'Moodle can cache themes, javascript, language strings, filtered text, rss feeds and many other pieces of calculated data. Purging these caches will delete that data from the server and force browsers to refetch data, so that you can be sure you are seeing the most up-to-date values produced by the current code. There is no danger in purging caches, but your site may appear slower for a while until the server and clients calculate new information and cache it.';
-$string['purgecachesfinished']= 'All caches were purged.';
+$string['purgecaches'] = 'Purge all caches';
+$string['purgecachesconfirm'] = 'Moodle can cache themes, javascript, language strings, filtered text, rss feeds and many other pieces of calculated data. Purging these caches will delete that data from the server and force browsers to refetch data, so that you can be sure you are seeing the most up-to-date values produced by the current code. There is no danger in purging caches, but your site may appear slower for a while until the server and clients calculate new information and cache it.';
+$string['purgecachesfinished'] = 'All caches were purged.';
$string['requestcategoryselection'] = 'Enable category selection';
$string['restorecourse'] = 'Restore course';
$string['restorernewroleid'] = 'Restorers\' role in courses';
$string['blogaboutthiscourse'] = 'Add an entry about this course';
$string['blogaboutthismodule'] = 'Add an entry about this {$a}';
$string['blogadministration'] = 'Blog administration';
-$string['blogdeleteconfirm'] = 'Delete this blog entry?';
+$string['blogdeleteconfirm'] = 'Delete the blog entry \'{$a}\'?';
$string['blogdisable'] = 'Blogging is disabled!';
$string['blogentries'] = 'Blog entries';
$string['blogentriesabout'] = 'Blog entries about {$a}';
$string['editstore'] = 'Edit store';
$string['editstoresuccess'] = 'Succesfully edited the cache store.';
$string['editdefinitionmappings'] = '{$a} definition store mappings';
-$string['editdefinitionsharing'] = 'Edit definition sharing for {$a}';
+$string['editdefinitionsharing'] = 'Edit definition sharing for {$a}';
$string['ex_configcannotsave'] = 'Unable to save the cache config to file.';
$string['ex_nodefaultlock'] = 'Unable to find a default lock instance.';
$string['ex_unabletolock'] = 'Unable to acquire a lock for caching.';
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['field101']='Natural and Physical Science';
-$string['field10101']='Mathematical Sciences';
-$string['field1010101']='Mathematics';
-$string['field1010103']='Statistics';
-$string['field1010199']='Mathematical Sciences (Other)';
-$string['field10103']='Physics and Astronomy';
-$string['field1010301']='Physics';
-$string['field1010303']='Astronomy';
-$string['field10105']='Chemical Sciences';
-$string['field1010501']='Organic Chemistry';
-$string['field1010503']='Inorganic Chemistry';
-$string['field1010599']='Chemical Sciences (Other)';
-$string['field10107']='Earth Sciences';
-$string['field1010701']='Atmospheric Sciences';
-$string['field1010703']='Geology';
-$string['field1010705']='Geophysics';
-$string['field1010707']='Geochemistry';
-$string['field1010709']='Soil Science';
-$string['field1010711']='Hydrology';
-$string['field1010713']='Oceanography';
-$string['field1010799']='Earth Sciences (Other)';
-$string['field10109']='Biological Sciences';
-$string['field1010901']='Biochemistry and Cell Biology';
-$string['field1010903']='Botany';
-$string['field1010905']='Ecology and Evolution';
-$string['field1010907']='Marine Science';
-$string['field1010909']='Genetics';
-$string['field1010911']='Microbiology';
-$string['field1010913']='Human Biology';
-$string['field1010915']='Zoology';
-$string['field1010999']='Biological Sciences (Other)';
-$string['field10199']='Other Natural and Physical Sciences';
-$string['field1019901']='Medical Science';
-$string['field1019903']='Forensic Science';
-$string['field1019905']='Food Science and Biotechnology';
-$string['field1019907']='Pharmacology';
-$string['field1019909']='Laboratory Technology';
-$string['field1019999']='Natural and Physical Sciences (Other)';
-$string['field102']='Information Technology';
-$string['field10201']='Computer Science';
-$string['field1020101']='Formal Language Theory';
-$string['field1020103']='Programming';
-$string['field1020105']='Computational Theory';
-$string['field1020107']='Compiler Construction';
-$string['field1020109']='Algorithms';
-$string['field1020111']='Data Structures';
-$string['field1020113']='Networks and Communications';
-$string['field1020115']='Computer Graphics';
-$string['field1020117']='Operating Systems';
-$string['field1020119']='Artificial Intelligence';
-$string['field1020199']='Computer Science (Other)';
-$string['field10203']='Information Systems';
-$string['field1020301']='Conceptual Modelling';
-$string['field1020303']='Database Management';
-$string['field1020305']='Systems Analysis and Design';
-$string['field1020307']='Decision Support Systems';
-$string['field1020399']='Information Systems (Other)';
-$string['field10299']='Other Information Technology';
-$string['field1029901']='Security Science';
-$string['field1029999']='Information Technology (Other)';
-$string['field103']='Engineering and Related Technologies';
-$string['field10301']='Manufacturing Engineering and Technology';
-$string['field1030101']='Manufacturing Engineering';
-$string['field1030103']='Printing';
-$string['field1030105']='Textile Making';
-$string['field1030107']='Garment Making';
-$string['field1030109']='Footwear Making';
-$string['field1030111']='Wood Machining and Turning';
-$string['field1030113']='Cabinet Making';
-$string['field1030115']='Furniture Upholstery and Renovation';
-$string['field1030117']='Furniture Polishing';
-$string['field1030199']='Manufacturing Engineering and Technology (Other)';
-$string['field10303']='Process and Resources Engineering';
-$string['field1030301']='Chemical Engineering';
-$string['field1030303']='Mining Engineering';
-$string['field1030305']='Materials Engineering';
-$string['field1030307']='Food Processing Technology';
-$string['field1030399']='Process and Resources Engineering (Other)';
-$string['field10305']='Automotive Engineering and Technology';
-$string['field1030501']='Automotive Engineering';
-$string['field1030503']='Vehicle Mechanics';
-$string['field1030505']='Automotive Electrics and Electronics';
-$string['field1030507']='Automotive Vehicle Refinishing';
-$string['field1030509']='Automotive Body Construction';
-$string['field1030511']='Panel Beating';
-$string['field1030513']='Upholstery and Vehicle Trimming';
-$string['field1030515']='Automotive Vehicle Operations';
-$string['field1030599']='Automotive Engineering and Technology (Other)';
-$string['field10307']='Mechanical and Industrial Engineering and Technology';
-$string['field1030701']='Mechanical Engineering';
-$string['field1030703']='Industrial Engineering';
-$string['field1030705']='Toolmaking';
-$string['field1030707']='Metal Fitting, Turning and Machining';
-$string['field1030709']='Sheetmetal Working';
-$string['field1030711']='Boilermaking and Welding';
-$string['field1030713']='Metal Casting and Patternmaking';
-$string['field1030715']='Precision Metalworking';
-$string['field1030717']='Plant and Machine Operations';
-$string['field1030799']='Mechanical and Industrial Engineering and Technology (Other)';
-$string['field10309']='Civil Engineering';
-$string['field1030901']='Construction Engineering';
-$string['field1030903']='Structural Engineering';
-$string['field1030905']='Building Services Engineering';
-$string['field1030907']='Water and Sanitary Engineering';
-$string['field1030909']='Transport Engineering';
-$string['field1030911']='Geotechnical Engineering';
-$string['field1030913']='Ocean Engineering';
-$string['field1030999']='Civil Engineering (Other)';
-$string['field10311']='Geomatic Engineering';
-$string['field1031101']='Surveying';
-$string['field1031103']='Mapping Science';
-$string['field1031199']='Geomatic Engineering (Other)';
-$string['field10313']='Electrical and Electronic Engineering and Technology';
-$string['field1031301']='Electrical Engineering';
-$string['field1031303']='Electronic Engineering';
-$string['field1031305']='Computer Engineering';
-$string['field1031307']='Communications Technologies';
-$string['field1031309']='Communications Equipment Installation and Maintenance';
-$string['field1031311']='Powerline Installation and Maintenance';
-$string['field1031313']='Electrical Fitting, Electrical Mechanics';
-$string['field1031315']='Refrigeration and Air Conditioning Mechanics';
-$string['field1031317']='Electronic Equipment Servicing';
-$string['field1031399']='Electrical and Electronic Engineering and Technology (Other)';
-$string['field10315']='Aerospace Engineering and Technology';
-$string['field1031501']='Aerospace Engineering';
-$string['field1031503']='Aircraft Maintenance Engineering';
-$string['field1031505']='Aircraft Operation';
-$string['field1031507']='Air Traffic Control';
-$string['field1031599']='Aerospace Engineering and Technology (Other)';
-$string['field10317']='Maritime Engineering and Technology';
-$string['field1031701']='Maritime Engineering';
-$string['field1031703']='Marine Construction';
-$string['field1031705']='Marine Craft Operation';
-$string['field1031799']='Maritime Engineering and Technology (Other)';
-$string['field10399']='Other Engineering and Related Technologies';
-$string['field1039901']='Environmental Engineering';
-$string['field1039903']='Biomedical Engineering';
-$string['field1039905']='Fire Technology';
-$string['field1039907']='Rail Operations';
-$string['field1039909']='Cleaning';
-$string['field1039999']='Engineering and Related Technologies (Other)';
-$string['field104']='Architecture and Building';
-$string['field10401']='Architecture and Urban Environment';
-$string['field1040101']='Architecture';
-$string['field1040103']='Urban Design and Regional Planning';
-$string['field1040105']='Landscape Architecture';
-$string['field1040107']='Interior and Environmental Design';
-$string['field1040199']='Architecture and Urban Environment (Other)';
-$string['field10403']='Building';
-$string['field1040301']='Building Science and Technology';
-$string['field1040303']='Building Construction Management';
-$string['field1040305']='Building Surveying';
-$string['field1040307']='Building Construction Economics';
-$string['field1040309']='Bricklaying and Stonemasonry';
-$string['field1040311']='Carpentry and Joinery';
-$string['field1040313']='Ceiling, Wall and Floor Fixing';
-$string['field1040315']='Roof Fixing';
-$string['field1040317']='Plastering';
-$string['field1040319']='Furnishing Installation';
-$string['field1040321']='Floor Coverings';
-$string['field1040323']='Glazing';
-$string['field1040325']='Painting, Decorating and Sign Writing';
-$string['field1040327']='Plumbing';
-$string['field1040329']='Scaffolding and Rigging';
-$string['field1040399']='Building (Other)';
-$string['field105']='Agriculture, Environmental and Related Studies';
-$string['field10501']='Agriculture';
-$string['field1050101']='Agricultural Science';
-$string['field1050103']='Wool Science';
-$string['field1050105']='Animal Husbandry';
-$string['field1050199']='Agriculture (Other)';
-$string['field10503']='Horticulture and Viticulture';
-$string['field1050301']='Horticulture';
-$string['field1050303']='Viticulture';
-$string['field10505']='Forestry Studies';
-$string['field1050501']='Forestry Studies';
-$string['field10507']='Fisheries Studies';
-$string['field1050701']='Aquaculture';
-$string['field1050799']='Fisheries Studies (Other)';
-$string['field10509']='Environmental Studies';
-$string['field1050901']='Land, Parks and Wildlife Management';
-$string['field1050999']='Environmental Studies (Other)';
-$string['field10599']='Other Agriculture, Environmental and Related Studies';
-$string['field1059901']='Pest and Weed Control';
-$string['field1059999']='Agriculture, Environmental and Related Studies (Other)';
-$string['field106']='Health';
-$string['field10601']='Medical Studies';
-$string['field1060101']='General Medicine';
-$string['field1060103']='Surgery';
-$string['field1060105']='Psychiatry';
-$string['field1060107']='Obstetrics and Gynaecology';
-$string['field1060109']='Paediatrics';
-$string['field1060111']='Anaesthesiology';
-$string['field1060113']='Pathology';
-$string['field1060115']='Radiology';
-$string['field1060117']='Internal Medicine';
-$string['field1060119']='General Practice';
-$string['field1060199']='Medical Studies (Other)';
-$string['field10603']='Nursing';
-$string['field1060301']='General Nursing';
-$string['field1060303']='Midwifery';
-$string['field1060305']='Mental Health Nursing';
-$string['field1060307']='Community Nursing';
-$string['field1060309']='Critical Care Nursing';
-$string['field1060311']='Aged Care Nursing';
-$string['field1060313']='Palliative Care Nursing';
-$string['field1060315']='Mothercraft Nursing and Family and Child Health Nursing';
-$string['field1060399']='Nursing (Other)';
-$string['field10605']='Pharmacy';
-$string['field1060501']='Pharmacy';
-$string['field10607']='Dental Studies';
-$string['field1060701']='Dentistry';
-$string['field1060703']='Dental Assisting';
-$string['field1060705']='Dental Technology';
-$string['field1060799']='Dental Studies (Other)';
-$string['field10609']='Optical Science';
-$string['field1060901']='Optometry';
-$string['field1060903']='Optical Technology';
-$string['field1060999']='Optical Science (Other)';
-$string['field10611']='Veterinary Studies';
-$string['field1061101']='Veterinary Science';
-$string['field1061103']='Veterinary Assisting';
-$string['field1061199']='Veterinary Studies (Other)';
-$string['field10613']='Public Health';
-$string['field1061301']='Occupational Health and Safety';
-$string['field1061303']='Environmental Health';
-$string['field1061305']='Indigenous Health';
-$string['field1061307']='Health Promotion';
-$string['field1061309']='Community Health';
-$string['field1061311']='Epidemiology';
-$string['field1061399']='Public Health (Other)';
-$string['field10615']='Radiography';
-$string['field1061501']='Radiography';
-$string['field10617']='Rehabilitation Therapies';
-$string['field1061701']='Physiotherapy';
-$string['field1061703']='Occupational Therapy';
-$string['field1061705']='Chiropractic and Osteopathy';
-$string['field1061707']='Speech Pathology';
-$string['field1061709']='Audiology';
-$string['field1061711']='Massage Therapy';
-$string['field1061713']='Podiatry';
-$string['field1061799']='Rehabilitation Therapies (Other)';
-$string['field10619']='Complementary Therapies';
-$string['field1061901']='Naturopathy';
-$string['field1061903']='Acupuncture';
-$string['field1061905']='Traditional Chinese Medicine';
-$string['field1061999']='Complementary Therapies (Other)';
-$string['field10699']='Other Health';
-$string['field1069901']='Nutrition and Dietetics';
-$string['field1069903']='Human Movement';
-$string['field1069905']='Paramedical Studies';
-$string['field1069907']='First Aid';
-$string['field1069999']='Health (Other)';
-$string['field107']='Education';
-$string['field10701']='Teacher Education';
-$string['field1070101']='Teacher Education: Early Childhood';
-$string['field1070103']='Teacher Education: Primary';
-$string['field1070105']='Teacher Education: Secondary';
-$string['field1070107']='Teacher-Librarianship';
-$string['field1070109']='Teacher Education: Vocational Education and Training';
-$string['field1070111']='Teacher Education: Higher Education';
-$string['field1070113']='Teacher Education: Special Education';
-$string['field1070115']='English As A Second Language Teaching';
-$string['field1070117']='Nursing Education Teacher Training';
-$string['field1070199']='Teacher Education (Other)';
-$string['field10703']='Curriculum and Education Studies';
-$string['field1070301']='Curriculum Studies';
-$string['field1070303']='Education Studies';
-$string['field10799']='Other Education';
-$string['field1079999']='Education (Other)';
-$string['field108']='Management and Commerce';
-$string['field10801']='Accounting';
-$string['field1080101']='Accounting';
-$string['field10803']='Business and Management';
-$string['field1080301']='Business Management';
-$string['field1080303']='Human Resource Management';
-$string['field1080305']='Personal Management Training';
-$string['field1080307']='Organisation Management';
-$string['field1080309']='Industrial Relations';
-$string['field1080311']='International Business';
-$string['field1080313']='Public and Health Care Administration';
-$string['field1080315']='Project Management';
-$string['field1080317']='Quality Management';
-$string['field1080319']='Hospitality Management';
-$string['field1080321']='Farm Management and Agribusiness';
-$string['field1080323']='Tourism Management';
-$string['field1080399']='Business and Management (Other)';
-$string['field10805']='Sales and Marketing';
-$string['field1080501']='Sales';
-$string['field1080503']='Real Estate';
-$string['field1080505']='Marketing';
-$string['field1080507']='Advertising';
-$string['field1080509']='Public Relations';
-$string['field1080599']='Sales and Marketing (Other)';
-$string['field10807']='Tourism';
-$string['field1080701']='Tourism';
-$string['field10809']='Office Studies';
-$string['field1080901']='Secretarial and Clerical Studies';
-$string['field1080903']='Keyboard Skills';
-$string['field1080905']='Practical Computing Skills';
-$string['field1080999']='Office Studies (Other)';
-$string['field10811']='Banking, Finance and Related Fields';
-$string['field1081101']='Banking and Finance';
-$string['field1081103']='Insurance and Actuarial Studies';
-$string['field1081105']='Investment and Securities';
-$string['field1081199']='Banking, Finance and Related Fields (Other)';
-$string['field10899']='Other Management and Commerce';
-$string['field1089901']='Purchasing, Warehousing and Distribution';
-$string['field1089903']='Valuation';
-$string['field1089999']='Management and Commerce (Other)';
-$string['field109']='Society and Culture';
-$string['field10901']='Political Science and Policy Studies';
-$string['field1090101']='Political Science';
-$string['field1090103']='Policy Studies';
-$string['field10903']='Studies In Human Society';
-$string['field1090301']='Sociology';
-$string['field1090303']='Anthropology';
-$string['field1090305']='History';
-$string['field1090307']='Archaeology';
-$string['field1090309']='Human Geography';
-$string['field1090311']='Indigenous Studies';
-$string['field1090313']='Gender Specific Studies';
-$string['field1090399']='Studies In Human Society (Other)';
-$string['field10905']='Human Welfare Studies and Services';
-$string['field1090501']='Social Work';
-$string['field1090503']='Children\'S Services';
-$string['field1090505']='Youth Work';
-$string['field1090507']='Care For The Aged';
-$string['field1090509']='Care For The Disabled';
-$string['field1090511']='Residential Client Care';
-$string['field1090513']='Counselling';
-$string['field1090515']='Welfare Studies';
-$string['field1090599']='Human Welfare Studies and Services (Other)';
-$string['field10907']='Behavioural Science';
-$string['field1090701']='Psychology';
-$string['field1090799']='Behavioural Science (Other)';
-$string['field10909']='Law';
-$string['field1090901']='Business and Commercial Law';
-$string['field1090903']='Constitutional Law';
-$string['field1090905']='Criminal Law';
-$string['field1090907']='Family Law';
-$string['field1090909']='International Law';
-$string['field1090911']='Taxation Law';
-$string['field1090913']='Legal Practice';
-$string['field1090999']='Law (Other)';
-$string['field10911']='Justice and Law Enforcement';
-$string['field1091101']='Justice Administration';
-$string['field1091103']='Legal Studies';
-$string['field1091105']='Police Studies';
-$string['field1091199']='Justice and Law Enforcement (Other)';
-$string['field10913']='Librarianship, Information Management and Curatorial Studies';
-$string['field1091301']='Librarianship and Information Management';
-$string['field1091303']='Curatorial Studies';
-$string['field10915']='Language and Literature';
-$string['field1091501']='English Language';
-$string['field1091503']='Northern European Languages';
-$string['field1091505']='Southern European Languages';
-$string['field1091507']='Eastern European Languages';
-$string['field1091509']='Southwest Asian and North African Languages';
-$string['field1091511']='Southern Asian Languages';
-$string['field1091513']='Southeast Asian Languages';
-$string['field1091515']='Eastern Asian Languages';
-$string['field1091517']='Australian Indigenous Languages';
-$string['field1091519']='Translating and Interpreting';
-$string['field1091521']='Linguistics';
-$string['field1091523']='Literature';
-$string['field1091599']='Language and Literature (Other)';
-$string['field10917']='Philosophy and Religious Studies';
-$string['field1091701']='Philosophy';
-$string['field1091703']='Religious Studies';
-$string['field10919']='Economics and Econometrics';
-$string['field1091901']='Economics';
-$string['field1091903']='Econometrics';
-$string['field10921']='Sport and Recreation';
-$string['field1092101']='Sport and Recreation Activities';
-$string['field1092103']='Sports Coaching, Officiating and Instruction';
-$string['field1092199']='Sport and Recreation (Other)';
-$string['field10999']='Other Society and Culture';
-$string['field1099901']='Family and Consumer Studies';
-$string['field1099903']='Criminology';
-$string['field1099905']='Security Services';
-$string['field1099999']='Society and Culture (Other)';
-$string['field110']='Creative Arts';
-$string['field11001']='Performing Arts';
-$string['field1100101']='Music';
-$string['field1100103']='Drama and Theatre Studies';
-$string['field1100105']='Dance';
-$string['field1100199']='Performing Arts (Other)';
-$string['field11003']='Visual Arts and Crafts';
-$string['field1100301']='Fine Arts';
-$string['field1100303']='Photography';
-$string['field1100305']='Crafts';
-$string['field1100307']='Jewellery Making';
-$string['field1100309']='Floristry';
-$string['field1100399']='Visual Arts and Crafts (Other)';
-$string['field11005']='Graphic and Design Studies';
-$string['field1100501']='Graphic Arts and Design Studies';
-$string['field1100503']='Textile Design';
-$string['field1100505']='Fashion Design';
-$string['field1100599']='Graphic and Design Studies (Other)';
-$string['field11007']='Communication and Media Studies';
-$string['field1100701']='Audio Visual Studies';
-$string['field1100703']='Journalism';
-$string['field1100705']='Written Communication';
-$string['field1100707']='Verbal Communication';
-$string['field1100799']='Communication and Media Studies (Other)';
-$string['field11099']='Other Creative Arts';
-$string['field1109999']='Creative Arts (Other)';
-$string['field111']='Food, Hospitality and Personal Services';
-$string['field11101']='Food and Hospitality';
-$string['field1110101']='Hospitality';
-$string['field1110103']='Food and Beverage Service';
-$string['field1110105']='Butchery';
-$string['field1110107']='Baking and Pastrymaking';
-$string['field1110109']='Cookery';
-$string['field1110111']='Food Hygiene';
-$string['field1110199']='Food and Hospitality (Other)';
-$string['field11103']='Personal Services';
-$string['field1110301']='Beauty Therapy';
-$string['field1110303']='Hairdressing';
-$string['field1110399']='Personal Services (Other)';
-$string['field112']='Mixed Field Programmes';
-$string['field11201']='General Education Programmes';
-$string['field1120101']='General Primary and Secondary Education Programmes';
-$string['field1120103']='Literacy and Numeracy Programmes';
-$string['field1120105']='Learning Skills Programmes';
-$string['field1120199']='General Education Programmes (Other)';
-$string['field11203']='Social Skills Programmes';
-$string['field1120301']='Social and Interpersonal Skills Programmes';
-$string['field1120303']='Survival Skills Programmes';
-$string['field1120305']='Parental Education Programmes';
-$string['field1120399']='Social Skills Programmes (Other)';
-$string['field11205']='Employment Skills Programmes';
-$string['field1120501']='Career Development Programmes';
-$string['field1120503']='Job Search Skills Programmes';
-$string['field1120505']='Work Practices Programmes';
-$string['field1120599']='Employment Skills Programmes (Other)';
-$string['field11299']='Other Mixed Field Programmes';
-$string['field1129999']='Mixed Field Programmes (Other)';
+$string['field101'] = 'Natural and Physical Science';
+$string['field10101'] = 'Mathematical Sciences';
+$string['field1010101'] = 'Mathematics';
+$string['field1010103'] = 'Statistics';
+$string['field1010199'] = 'Mathematical Sciences (Other)';
+$string['field10103'] = 'Physics and Astronomy';
+$string['field1010301'] = 'Physics';
+$string['field1010303'] = 'Astronomy';
+$string['field10105'] = 'Chemical Sciences';
+$string['field1010501'] = 'Organic Chemistry';
+$string['field1010503'] = 'Inorganic Chemistry';
+$string['field1010599'] = 'Chemical Sciences (Other)';
+$string['field10107'] = 'Earth Sciences';
+$string['field1010701'] = 'Atmospheric Sciences';
+$string['field1010703'] = 'Geology';
+$string['field1010705'] = 'Geophysics';
+$string['field1010707'] = 'Geochemistry';
+$string['field1010709'] = 'Soil Science';
+$string['field1010711'] = 'Hydrology';
+$string['field1010713'] = 'Oceanography';
+$string['field1010799'] = 'Earth Sciences (Other)';
+$string['field10109'] = 'Biological Sciences';
+$string['field1010901'] = 'Biochemistry and Cell Biology';
+$string['field1010903'] = 'Botany';
+$string['field1010905'] = 'Ecology and Evolution';
+$string['field1010907'] = 'Marine Science';
+$string['field1010909'] = 'Genetics';
+$string['field1010911'] = 'Microbiology';
+$string['field1010913'] = 'Human Biology';
+$string['field1010915'] = 'Zoology';
+$string['field1010999'] = 'Biological Sciences (Other)';
+$string['field10199'] = 'Other Natural and Physical Sciences';
+$string['field1019901'] = 'Medical Science';
+$string['field1019903'] = 'Forensic Science';
+$string['field1019905'] = 'Food Science and Biotechnology';
+$string['field1019907'] = 'Pharmacology';
+$string['field1019909'] = 'Laboratory Technology';
+$string['field1019999'] = 'Natural and Physical Sciences (Other)';
+$string['field102'] = 'Information Technology';
+$string['field10201'] = 'Computer Science';
+$string['field1020101'] = 'Formal Language Theory';
+$string['field1020103'] = 'Programming';
+$string['field1020105'] = 'Computational Theory';
+$string['field1020107'] = 'Compiler Construction';
+$string['field1020109'] = 'Algorithms';
+$string['field1020111'] = 'Data Structures';
+$string['field1020113'] = 'Networks and Communications';
+$string['field1020115'] = 'Computer Graphics';
+$string['field1020117'] = 'Operating Systems';
+$string['field1020119'] = 'Artificial Intelligence';
+$string['field1020199'] = 'Computer Science (Other)';
+$string['field10203'] = 'Information Systems';
+$string['field1020301'] = 'Conceptual Modelling';
+$string['field1020303'] = 'Database Management';
+$string['field1020305'] = 'Systems Analysis and Design';
+$string['field1020307'] = 'Decision Support Systems';
+$string['field1020399'] = 'Information Systems (Other)';
+$string['field10299'] = 'Other Information Technology';
+$string['field1029901'] = 'Security Science';
+$string['field1029999'] = 'Information Technology (Other)';
+$string['field103'] = 'Engineering and Related Technologies';
+$string['field10301'] = 'Manufacturing Engineering and Technology';
+$string['field1030101'] = 'Manufacturing Engineering';
+$string['field1030103'] = 'Printing';
+$string['field1030105'] = 'Textile Making';
+$string['field1030107'] = 'Garment Making';
+$string['field1030109'] = 'Footwear Making';
+$string['field1030111'] = 'Wood Machining and Turning';
+$string['field1030113'] = 'Cabinet Making';
+$string['field1030115'] = 'Furniture Upholstery and Renovation';
+$string['field1030117'] = 'Furniture Polishing';
+$string['field1030199'] = 'Manufacturing Engineering and Technology (Other)';
+$string['field10303'] = 'Process and Resources Engineering';
+$string['field1030301'] = 'Chemical Engineering';
+$string['field1030303'] = 'Mining Engineering';
+$string['field1030305'] = 'Materials Engineering';
+$string['field1030307'] = 'Food Processing Technology';
+$string['field1030399'] = 'Process and Resources Engineering (Other)';
+$string['field10305'] = 'Automotive Engineering and Technology';
+$string['field1030501'] = 'Automotive Engineering';
+$string['field1030503'] = 'Vehicle Mechanics';
+$string['field1030505'] = 'Automotive Electrics and Electronics';
+$string['field1030507'] = 'Automotive Vehicle Refinishing';
+$string['field1030509'] = 'Automotive Body Construction';
+$string['field1030511'] = 'Panel Beating';
+$string['field1030513'] = 'Upholstery and Vehicle Trimming';
+$string['field1030515'] = 'Automotive Vehicle Operations';
+$string['field1030599'] = 'Automotive Engineering and Technology (Other)';
+$string['field10307'] = 'Mechanical and Industrial Engineering and Technology';
+$string['field1030701'] = 'Mechanical Engineering';
+$string['field1030703'] = 'Industrial Engineering';
+$string['field1030705'] = 'Toolmaking';
+$string['field1030707'] = 'Metal Fitting, Turning and Machining';
+$string['field1030709'] = 'Sheetmetal Working';
+$string['field1030711'] = 'Boilermaking and Welding';
+$string['field1030713'] = 'Metal Casting and Patternmaking';
+$string['field1030715'] = 'Precision Metalworking';
+$string['field1030717'] = 'Plant and Machine Operations';
+$string['field1030799'] = 'Mechanical and Industrial Engineering and Technology (Other)';
+$string['field10309'] = 'Civil Engineering';
+$string['field1030901'] = 'Construction Engineering';
+$string['field1030903'] = 'Structural Engineering';
+$string['field1030905'] = 'Building Services Engineering';
+$string['field1030907'] = 'Water and Sanitary Engineering';
+$string['field1030909'] = 'Transport Engineering';
+$string['field1030911'] = 'Geotechnical Engineering';
+$string['field1030913'] = 'Ocean Engineering';
+$string['field1030999'] = 'Civil Engineering (Other)';
+$string['field10311'] = 'Geomatic Engineering';
+$string['field1031101'] = 'Surveying';
+$string['field1031103'] = 'Mapping Science';
+$string['field1031199'] = 'Geomatic Engineering (Other)';
+$string['field10313'] = 'Electrical and Electronic Engineering and Technology';
+$string['field1031301'] = 'Electrical Engineering';
+$string['field1031303'] = 'Electronic Engineering';
+$string['field1031305'] = 'Computer Engineering';
+$string['field1031307'] = 'Communications Technologies';
+$string['field1031309'] = 'Communications Equipment Installation and Maintenance';
+$string['field1031311'] = 'Powerline Installation and Maintenance';
+$string['field1031313'] = 'Electrical Fitting, Electrical Mechanics';
+$string['field1031315'] = 'Refrigeration and Air Conditioning Mechanics';
+$string['field1031317'] = 'Electronic Equipment Servicing';
+$string['field1031399'] = 'Electrical and Electronic Engineering and Technology (Other)';
+$string['field10315'] = 'Aerospace Engineering and Technology';
+$string['field1031501'] = 'Aerospace Engineering';
+$string['field1031503'] = 'Aircraft Maintenance Engineering';
+$string['field1031505'] = 'Aircraft Operation';
+$string['field1031507'] = 'Air Traffic Control';
+$string['field1031599'] = 'Aerospace Engineering and Technology (Other)';
+$string['field10317'] = 'Maritime Engineering and Technology';
+$string['field1031701'] = 'Maritime Engineering';
+$string['field1031703'] = 'Marine Construction';
+$string['field1031705'] = 'Marine Craft Operation';
+$string['field1031799'] = 'Maritime Engineering and Technology (Other)';
+$string['field10399'] = 'Other Engineering and Related Technologies';
+$string['field1039901'] = 'Environmental Engineering';
+$string['field1039903'] = 'Biomedical Engineering';
+$string['field1039905'] = 'Fire Technology';
+$string['field1039907'] = 'Rail Operations';
+$string['field1039909'] = 'Cleaning';
+$string['field1039999'] = 'Engineering and Related Technologies (Other)';
+$string['field104'] = 'Architecture and Building';
+$string['field10401'] = 'Architecture and Urban Environment';
+$string['field1040101'] = 'Architecture';
+$string['field1040103'] = 'Urban Design and Regional Planning';
+$string['field1040105'] = 'Landscape Architecture';
+$string['field1040107'] = 'Interior and Environmental Design';
+$string['field1040199'] = 'Architecture and Urban Environment (Other)';
+$string['field10403'] = 'Building';
+$string['field1040301'] = 'Building Science and Technology';
+$string['field1040303'] = 'Building Construction Management';
+$string['field1040305'] = 'Building Surveying';
+$string['field1040307'] = 'Building Construction Economics';
+$string['field1040309'] = 'Bricklaying and Stonemasonry';
+$string['field1040311'] = 'Carpentry and Joinery';
+$string['field1040313'] = 'Ceiling, Wall and Floor Fixing';
+$string['field1040315'] = 'Roof Fixing';
+$string['field1040317'] = 'Plastering';
+$string['field1040319'] = 'Furnishing Installation';
+$string['field1040321'] = 'Floor Coverings';
+$string['field1040323'] = 'Glazing';
+$string['field1040325'] = 'Painting, Decorating and Sign Writing';
+$string['field1040327'] = 'Plumbing';
+$string['field1040329'] = 'Scaffolding and Rigging';
+$string['field1040399'] = 'Building (Other)';
+$string['field105'] = 'Agriculture, Environmental and Related Studies';
+$string['field10501'] = 'Agriculture';
+$string['field1050101'] = 'Agricultural Science';
+$string['field1050103'] = 'Wool Science';
+$string['field1050105'] = 'Animal Husbandry';
+$string['field1050199'] = 'Agriculture (Other)';
+$string['field10503'] = 'Horticulture and Viticulture';
+$string['field1050301'] = 'Horticulture';
+$string['field1050303'] = 'Viticulture';
+$string['field10505'] = 'Forestry Studies';
+$string['field1050501'] = 'Forestry Studies';
+$string['field10507'] = 'Fisheries Studies';
+$string['field1050701'] = 'Aquaculture';
+$string['field1050799'] = 'Fisheries Studies (Other)';
+$string['field10509'] = 'Environmental Studies';
+$string['field1050901'] = 'Land, Parks and Wildlife Management';
+$string['field1050999'] = 'Environmental Studies (Other)';
+$string['field10599'] = 'Other Agriculture, Environmental and Related Studies';
+$string['field1059901'] = 'Pest and Weed Control';
+$string['field1059999'] = 'Agriculture, Environmental and Related Studies (Other)';
+$string['field106'] = 'Health';
+$string['field10601'] = 'Medical Studies';
+$string['field1060101'] = 'General Medicine';
+$string['field1060103'] = 'Surgery';
+$string['field1060105'] = 'Psychiatry';
+$string['field1060107'] = 'Obstetrics and Gynaecology';
+$string['field1060109'] = 'Paediatrics';
+$string['field1060111'] = 'Anaesthesiology';
+$string['field1060113'] = 'Pathology';
+$string['field1060115'] = 'Radiology';
+$string['field1060117'] = 'Internal Medicine';
+$string['field1060119'] = 'General Practice';
+$string['field1060199'] = 'Medical Studies (Other)';
+$string['field10603'] = 'Nursing';
+$string['field1060301'] = 'General Nursing';
+$string['field1060303'] = 'Midwifery';
+$string['field1060305'] = 'Mental Health Nursing';
+$string['field1060307'] = 'Community Nursing';
+$string['field1060309'] = 'Critical Care Nursing';
+$string['field1060311'] = 'Aged Care Nursing';
+$string['field1060313'] = 'Palliative Care Nursing';
+$string['field1060315'] = 'Mothercraft Nursing and Family and Child Health Nursing';
+$string['field1060399'] = 'Nursing (Other)';
+$string['field10605'] = 'Pharmacy';
+$string['field1060501'] = 'Pharmacy';
+$string['field10607'] = 'Dental Studies';
+$string['field1060701'] = 'Dentistry';
+$string['field1060703'] = 'Dental Assisting';
+$string['field1060705'] = 'Dental Technology';
+$string['field1060799'] = 'Dental Studies (Other)';
+$string['field10609'] = 'Optical Science';
+$string['field1060901'] = 'Optometry';
+$string['field1060903'] = 'Optical Technology';
+$string['field1060999'] = 'Optical Science (Other)';
+$string['field10611'] = 'Veterinary Studies';
+$string['field1061101'] = 'Veterinary Science';
+$string['field1061103'] = 'Veterinary Assisting';
+$string['field1061199'] = 'Veterinary Studies (Other)';
+$string['field10613'] = 'Public Health';
+$string['field1061301'] = 'Occupational Health and Safety';
+$string['field1061303'] = 'Environmental Health';
+$string['field1061305'] = 'Indigenous Health';
+$string['field1061307'] = 'Health Promotion';
+$string['field1061309'] = 'Community Health';
+$string['field1061311'] = 'Epidemiology';
+$string['field1061399'] = 'Public Health (Other)';
+$string['field10615'] = 'Radiography';
+$string['field1061501'] = 'Radiography';
+$string['field10617'] = 'Rehabilitation Therapies';
+$string['field1061701'] = 'Physiotherapy';
+$string['field1061703'] = 'Occupational Therapy';
+$string['field1061705'] = 'Chiropractic and Osteopathy';
+$string['field1061707'] = 'Speech Pathology';
+$string['field1061709'] = 'Audiology';
+$string['field1061711'] = 'Massage Therapy';
+$string['field1061713'] = 'Podiatry';
+$string['field1061799'] = 'Rehabilitation Therapies (Other)';
+$string['field10619'] = 'Complementary Therapies';
+$string['field1061901'] = 'Naturopathy';
+$string['field1061903'] = 'Acupuncture';
+$string['field1061905'] = 'Traditional Chinese Medicine';
+$string['field1061999'] = 'Complementary Therapies (Other)';
+$string['field10699'] = 'Other Health';
+$string['field1069901'] = 'Nutrition and Dietetics';
+$string['field1069903'] = 'Human Movement';
+$string['field1069905'] = 'Paramedical Studies';
+$string['field1069907'] = 'First Aid';
+$string['field1069999'] = 'Health (Other)';
+$string['field107'] = 'Education';
+$string['field10701'] = 'Teacher Education';
+$string['field1070101'] = 'Teacher Education: Early Childhood';
+$string['field1070103'] = 'Teacher Education: Primary';
+$string['field1070105'] = 'Teacher Education: Secondary';
+$string['field1070107'] = 'Teacher-Librarianship';
+$string['field1070109'] = 'Teacher Education: Vocational Education and Training';
+$string['field1070111'] = 'Teacher Education: Higher Education';
+$string['field1070113'] = 'Teacher Education: Special Education';
+$string['field1070115'] = 'English As A Second Language Teaching';
+$string['field1070117'] = 'Nursing Education Teacher Training';
+$string['field1070199'] = 'Teacher Education (Other)';
+$string['field10703'] = 'Curriculum and Education Studies';
+$string['field1070301'] = 'Curriculum Studies';
+$string['field1070303'] = 'Education Studies';
+$string['field10799'] = 'Other Education';
+$string['field1079999'] = 'Education (Other)';
+$string['field108'] = 'Management and Commerce';
+$string['field10801'] =&nb