"Enroll me in this course" button is not working

"Enroll me in this course" button is not working

by Andrew Daugdaug -
Number of replies: 8

"Enroll me in this course" button is not working. Anybody who can help me on this please.

Moodle 2.3.3

To reproduce the issue, please follow the steps below:

1. Login to www.twirx.com using my student account:
Username: pupil3
Password: Test!@#143

2. Go to this link: http://www.twirx.com/enrol/index.php?id=9
and try to click on "Enroll me in this course" button at the left pane.
Notice that when that button is clicked, it does not do anything.

3. That is a self enroll button and it should redirect to: http://www.twirx.com/enrol/index.php

4. The left button when clicked should go to the same place with the "Enroll me" button at the lower page. Please see screenshot.

Please advise. Thanks!

Attachment left-enrol-button-not-working.jpg
Average of ratings: -
In reply to Andrew Daugdaug

Re: "Enroll me in this course" button is not working

by Torsten Händler -

I have test it and it works for me

In reply to Torsten Händler

Re: "Enroll me in this course" button is not working

by Andrew Daugdaug -

Hi Torsten, 

Thanks for the quick reply. Did you click on the Enroll button at the left pane? The enroll button at the lower center page is working fine. The issue was the enroll button at the left pane. May I know also what browser did you use? 

Again, thanks a lot for your help.

Andrew

In reply to Andrew Daugdaug

Re: "Enroll me in this course" button is not working

by ray dee -

s not the broswer; em using mozilla fire fox4; easyphp as sever; win vista;

the login button cannot log me in; error dats comes up s:

; Can not initialise PHP session, please verify that your browser accepts cookies. using= eazy php server, mozilla latest browser, 2.4 moodle latest

In reply to ray dee

Re: "Enroll me in this course" button is not working

by Richard Price -

Ray Dee, all except one of your posts seem to have pretty much the same content about a PHP session... This is not relevant to Andrew's Issue.

In reply to Torsten Händler

Re: "Enroll me in this course" button is not working

by Mantrell Mantrell -

Hello, the issue is that the Bottom Enroll Me button redirects only. However, if you try clicking on the Enroll Me in This Course located at the top left under settings, it does not redirect.

The link appears to be hard coded. Where can this code be found in moodle so that it can be changed? Both menus should redirect to the actual course once a student clicks on it, but this is not the case here. Looks as if it was hardcoded and need to find out where to make the change so that it does redirect.

 

Does anyone know where to find the code to make this change? Thanks Moodle Learner

 

In reply to Mantrell Mantrell

Re: "Enroll me in this course" button is not working

by Pete Jones -

I know this may be a bit late for you, Mantrell, but I thought I'd post the code here for anyone else who needs it:

The code is in the enrollib.php file in the lib folder.

if ($plugin->show_enrolme_link($instance)) {
                        $url = new moodle_url('/enrol/index.php', array('id'=>$course->id));
                        $shortname = format_string($course->shortname, true, array('context' => $coursecontext));
                        $coursenode->add(get_string('enrolme', 'core_enrol', $shortname), $url, navigation_node::TYPE_SETTING, null, 'enrolself', new pix_icon('i/user', ''));
                        break;
                    }

You can remove the code and this will remove the 'Enrol me in this course' link in the admin block.

In reply to Andrew Daugdaug

Re: "Enroll me in this course" button is not working

by Richard Price -

Hi Andrew, I get exactly the same behaviour that you have mentioned. Both the link and the button seem to be directing to the same enrol/index.php?id=9

Does the account "pupil3" have any system wide roles applied to it?
On the courses, all appear to have the same behaviour with this account.
Have you tried setting up another account? Do the other accounts have this same issue?

Which Enrolment options are enabled for your courses?