Moodle: How I can disable course as like as units? - moodle

I'm working on moodle LMS. I wanna disble as like as units. I know courses have an option for show or hidden. But I wanna disable course. So user should be able see there are some course but there are disable (unavailable).
Can anybody help me please?

You should add the permission moodle/course:viewhiddencoursesto the logged in user role. That way they can see the hidden course. Additionally even if they do have permission to access all the courses it doesn't work on hidden courses so they stay disabled.

Related

Wagtail Forms: How to make preset from field so editor can't change anything?

I'm trying to create a form which will always have the same form fields. I'm following the documentation but can't seem to find an answer.
The easiest way is through the Wagtail admin. First choose Lock from the popup menu at the bottom of the page you wish to lock. Then assign the user to a group for which you want to deny the ability to change the locked page. By default the Editors group does not allow changing the lock state of a page. If you can't use that group, then click Settings and then Groups and then choose the a different group that you have created for the user. Under the PAGE PERMISSIONS section add a new page permission and choose the page type that you want to deny the user the ability to change. Make sure Unlock is not chosen and save your page permission. If you set things up this way on your development machine, you'll just have to be sure to do the same thing in production.
I would in that case simple make a django model for it and not use wagtail forms. That way the user can't change it.

Facebook OAuth box showing Login instead of Allow

The issue I am having is that in the authentication box are login/cancel buttons. This is not what I want, I am wanting it to show Allow/Don't Allow.
I thought this was the default but for some reason it is showing up differently.
I am not sure why this would be happening. Any help on this problem would be much appreciated.
You can view the app at https://apps.facebook.com/found-it-on-carsale/
Basically, user need to login(in other words,authorize the application)...After that,user will need to allow/dont allow the application...Once the user allow the application,it will not showing allow/dont allow again...The most important thing is,user must login....
Thats a part of protocol.Once user authorize him self or herself for a particular application next time when user will come he/she will be asked to login and since they have already approved access, they will not be asked again.
user will be asked to approve/deny if
User changed his/her password.
Your application has been disabled for some reason
You have changed the scope
Why you want user to approve/deny your access request every time when he has already approved and has shown faith on your application? it will create bad user experience

FQL if friend then else add - Facebook for websites

I am trying to make a add as friend botton on my website. And that I have made without any problem.
Just by doing this:Bliv ven med mig
But it is only opening a new website where I can click add friend.
What I want is it to do, is to check when the user click connect, then check if we are friend, if we are then change the connect botton to a like box, otherwise it will ask the user to become "add friend" and then change to like box.
I know it is posible but not how..
I have seen this work on www.janlundsgaard.dk in the sidebar.
Hopes someone can help me :)
You won't be able to do this without the user's user id - which you won't be able to get unless they grant permission to your app. Once they've done that you can check easily if the user is a friend of yours by checking your/their friends list - but you won't be able to see this without having them authorise your app

Do Facebook apps have to ask for user permissions at the start?

Whenever I first click on a Facebook app it puts up a screen asking for permissions. Does the API enforce this, or is it possible to display a screen using either fake or the user's publicly accessible data?
You do not have to ask for any permissions right away. Your app can have the equivalent of a "guest" mode, similar to how many websites work until the user has logged in. I'm not sure why more apps don't operate like that, as a user I'm always a bit put off when something asks for permission before I've even seen the first page of it.

Is there a way to update User profile data from an application e.g. Political View?

I was wondering if there is a way to update a piece of user info from an application, for example siblings or political views or school or place of work or any other info.
I couldn't find such functionality mentioned in the developer doc directly. I was wondering if there is a way around it.
You can't change the profile of a user.
See the list of all the elements you can access and publish on facebook though app