New course ratings block

Re: New course ratings block

by Jenny Gray -
Number of replies: 5
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.
In reply to Jenny Gray

Re: New course ratings block

by Minas Pachnis -
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. mixed


In reply to Minas Pachnis

Re: New course ratings block

by Minas Pachnis -
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?


Image Hosted by ImageShack.us
w1257.png
In reply to Minas Pachnis

Re: New course ratings block

by Jenny Gray -
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.


In reply to Jenny Gray

Re: New course ratings block

by Minas Pachnis -
Thanks Jenny. Now the login page is like a charm! smile

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.
In reply to Minas Pachnis

Re: New course ratings block

by Jenny Gray -
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.