To fix this, we need to remove the function get_login_form_js, which is used to generate the sidebar login form, and the login form for the login page. It is also used in the saml authentication plugin. The contents of the function are as follows:
/**
* Returns javascript to assist with the rendering of the login forms. The
* javascript is used to detect whether cookies are enabled, and not show the
* login form if they are not.
*
* @param string $form A rendered login form
* @return string The form with extra javascript added for cookie detection
* @private
*/
function get_login_form_js($form) {
$form = str_replace('/', '\/', str_replace("'", "\'", (str_replace(array("\n", "\t"), '', $form))));
$strcookiesnotenabled = json_encode(get_string('cookiesnotenabled'));
$cookiename = get_config('cookieprefix') . 'ctest';
return <<<EOF
<script type="text/javascript">
var loginbox = $('loginform_container');
document.cookie = "$cookiename=1";
if (document.cookie) {
loginbox.innerHTML = '$form';
document.cookie = '$cookiename=1;expires=1/1/1990 00:00:00';
}
else {
replaceChildNodes(loginbox, P(null, $strcookiesnotenabled));
}
</script>
EOF;
}
The cookie check fails though.. so it doesn't serve much purpose at all, and I think starting to get rid of the js requirement is a good idea
To fix this, we need to remove the function get_login_form_js, which is used to generate the sidebar login form, and the login form for the login page. It is also used in the saml authentication plugin. The contents of the function are as follows:
/** form_js( $form) { array(" \n", "\t"), '', $form)))); notenabled = json_encode( get_string( 'cookiesnotenab led')); 'cookieprefix' ) . 'ctest'; javascript" > container' ); innerHTML = '$form'; 1;expires= 1/1/1990 00:00:00'; dNodes( loginbox, P(null, $strcookiesnote nabled) );
* Returns javascript to assist with the rendering of the login forms. The
* javascript is used to detect whether cookies are enabled, and not show the
* login form if they are not.
*
* @param string $form A rendered login form
* @return string The form with extra javascript added for cookie detection
* @private
*/
function get_login_
$form = str_replace('/', '\/', str_replace("'", "\'", (str_replace(
$strcookies
$cookiename = get_config(
return <<<EOF
<script type="text/
var loginbox = $('loginform_
document.cookie = "$cookiename=1";
if (document.cookie) {
loginbox.
document.cookie = '$cookiename=
}
else {
replaceChil
}
</script>
EOF;
}
The cookie check fails though.. so it doesn't serve much purpose at all, and I think starting to get rid of the js requirement is a good idea