I've checked that page in our own custom theme and a number of the default themes, but they don't show the problem you're having.
I expect then, there's something slightly wrong with your theme but I can't tell without access to the site.
Check if you get the same problem if your guest user tries to post to a forum - they should see a similar login option screen.
I check that and when a guest trying to post on a forum the page that shows up with the login question is just fine.
I also check some others activities (chat, choice) and they look just fine.
I also check some others activities (chat, choice) and they look just fine.
i fix the style problem like that:
rate.php
i change the: print_header('Not Logged In', 'Please login', '', '' , '', true);
to: print_header_simple('Not Logged In', 'Please login', '', '' , '', true);
I try to add the navmenu like this but i get a number(1) which i don't know where it comes and from the menu missing the hole path home > course_name > .....
$navigation = build_navigation('');
print_header_simple($navigation, 'Not Logged In', 'Please login', '', '' , '', true);
can u help me with that?
rate.php
i change the: print_header('Not Logged In', 'Please login', '', '' , '', true);
to: print_header_simple('Not Logged In', 'Please login', '', '' , '', true);
I try to add the navmenu like this but i get a number(1) which i don't know where it comes and from the menu missing the hole path home > course_name > .....
$navigation = build_navigation('');
print_header_simple($navigation, 'Not Logged In', 'Please login', '', '' , '', true);
can u help me with that?
I've updated the code in CVS, I hope it will work for you now.
I've swapped to print_header_simple, and changed the navigation so it is the same for the login page as if you get to the rating page - that way there are no extra language strings and is the same way that forum post works.
I've swapped to print_header_simple, and changed the navigation so it is the same for the login page as if you get to the rating page - that way there are no extra language strings and is the same way that forum post works.
Thanks Jenny. Now the login page is like a charm!
As i see you change the:
$existing_answer = get_record( 'block_rate_course', 'course', $course->id, 'userid', $USER->id );
to:
$existing_answer = $DB->get_record( 'block_rate_course', array('course'=>$course->id, 'userid'=>$USER->id));
which give me this error when i'm trying to rate a course
Fatal error: Call to a member function get_record() on a non-object in /var/www/vhosts/moodle/htdocs/blocks/rate_course/rate.php on line 38
change it back everything works ok.
As i see you change the:
$existing_answer = get_record( 'block_rate_course', 'course', $course->id, 'userid', $USER->id );
to:
$existing_answer = $DB->get_record( 'block_rate_course', array('course'=>$course->id, 'userid'=>$USER->id));
which give me this error when i'm trying to rate a course
Fatal error: Call to a member function get_record() on a non-object in /var/www/vhosts/moodle/htdocs/blocks/rate_course/rate.php on line 38
change it back everything works ok.
I think you might have taken the HEAD version from CVS which is compatible with Moodle 2.0. You need to take the one from the 1.9 branch.