General help

Restrict shared account to one course

 
Picture of Frank Black
Restrict shared account to one course
 

Moodle v32


I was thinking of giving the parents of our students a shared account to log-in with.

I want this shared user to be restricted to one course after logging in.

Lots of our other courses have guest access enabled (ie. no enrollment), and I don't want this shared user to access those.


Anyone have any ideas how I would do that?


Thanks.

 
Average of ratings: -
Picture of S. kavita
Re: Restrict shared account to one course
Particularly helpful MoodlersTesters

Hi Frank,

In Front page settings do the following:

Before login : Do not show List of courses or List of Categories, only show announcements and News items

After login: Show only Enrolled courses, do not show list of courses or list of categories.

Now you have to do some changes in code too to hide the "All courses" link which enable when you set the front page to show only enrolled courses.

You can hide this link in renderer.php file which you will find under Moodle>course>renderer.php

In the file search for "All courses" then comment out these two lines:

//'viewmoreurl' => new moodle_url('/course/index.php'),

//'viewmoretext' => new lang_string('fulllistofcourses')


After doing this the parents when logged in then they can be able to view their course in which they are enrolled.

Hope that help.


 
Average of ratings: -
Mary Cooch
Re: Restrict shared account to one course
Documentation writersMoodle Course Creator Certificate holdersMoodle HQParticularly helpful MoodlersTestersTranslators

Just pointing out though that any parent who knows about it can find the guest access courses by going to  YOURMOODLESITE/course/index.php

 
Average of ratings: -
Picture of sumit negi
Re: Restrict shared account to one course
 

Add a block "My courses" on the user dashboard, that will show only those courses to user in which he/she is enrolled, and to prevent this user to access other courses where you have enabled guest access, the only way is that, set password for guest, so only those users will be able to access those courses who have that password.

Hope it works!!


 
Average of ratings: -