iclicker_service::$domain_URL = $block_iclicker_domain_url;
} else {
    iclicker_service::$domain_URL = $CFG->wwwroot;
}
if (!empty($block_iclicker_disable_alternateid)) {
    iclicker_service::$disable_alternateid = true;
}
/* cannot change this for now
if (!empty($block_iclicker_allow_sharing)) {
    iclicker_service::$allow_remote_sharing = true;
}*/
if (!empty($block_iclicker_use_national_ws)) {
    iclicker_service::$use_national_webservices = true;
}
if (!empty($block_iclicker_webservices_url)) {
    iclicker_service::$webservices_URL = $block_iclicker_webservices_url;
}
if (!empty($block_iclicker_webservices_username)) {
    iclicker_service::$webservices_username = $block_iclicker_webservices_username;
}
if (!empty($block_iclicker_webservices_password)) {
    iclicker_service::$webservices_password = $block_iclicker_webservices_password;
}
if (!empty($block_iclicker_disable_sync)) {
    iclicker_service::$disable_sync_with_national = true;
}
if (!empty($block_iclicker_max_courses_to_fetch) && is_numeric($block_iclicker_max_courses_to_fetch) && $block_iclicker_max_courses_to_fetch > 0) {
    iclicker_service::$max_courses_to_fetch = intval($block_iclicker_max_courses_to_fetch);
}
if (!empty($block_iclicker_sso_shared_key)) {
    iclicker_service::$block_iclicker_sso_enabled = true;