I want to create new course by teacher in moodle. Now only admin can create new course and upload file in my moodle.I define admin,teacher,student in my moodle.To upload file by teacher .I want to know where i change permission, teacher can upload file and create new course. pls
Teachers don't have permission to create courses.
There are three things you can do
Make the teachers that you want to allow creating courses Course Creators
(See http://docs.moodle.org/22/en/Course_creator_role) this is what I do btw.
You can modify the default permissions for teachers to allow them to also create courses (See default permissions)
You can duplicate the standard role 'teacher' and create a new role called 'teacher+' or something and give that role permission to create courses.
Option 1 is by far the easiest :)
To override the default teacher's permission check moodle doc -
http://docs.moodle.org/23/en/Permissions#Course_and_activity_permissions
To create course and upload file following capabilities are responsible so you need to allow these capabilities for teacher -
http://docs.moodle.org/23/en/Capabilities/moodle/course:create
http://docs.moodle.org/23/en/Capabilities/moodle/course:managefiles
Related
I want to upload course using upload courses menu.
and i want to import the id with the other fields.
I tried "id","shortname","fullname","category" as a filed on the csv.But it uses incremented id instead.
Oh and i want the same thing for user too.
That cannot be done - all ids in Moodle are automatically generated, in order to make sure they always uniquely identify the item (course, user, etc).
Instead of trying to identify the course by id, you should look at identifying it by shortname or idnumber.
I'm absolutely new of Symfony, and I'm trying to implement a registration form that works only with invitation
but that can redirect two different forms for two different roles.
In practice if I send an invitation for an USER_TYPE1 role the client can only register like USER_TYPE1, if I send an invitation for an USER_TYPE2 the client can only register like USER_TYPE2 (and, of course, assigns the corrispondent role).
Is it possible?
thank you in advance for your help
UPDATE:
I want two different form because one user will be allowed to update file, but will also have to set his position and other important settings. The second user will only allow to download the files uploaded by the first kind of user, and his profile needs completely different information.
I do not have enough reputation to ask for details, but one thing that is not clear in your question is: why do you need 2 different forms? In your question, you mention 2 different roles, but why do you need 2 different forms? If you really need 2 different forms, then you should first:
- create a new form type
- create a new view (twig)
Like Boris suggested, I would keep some kind of token for every invitation sent, and associate an email address, and a role to it. Then modify your registration route so you can pass a token in there, like this:
register:
pattern: /signup/{token}
defaults: { _controller: MyBundle:Registration:signup }
In the registration action of your controller, you created the correct form type and display the appropriate twig, depending on the ROLE associated to the token you just got. And when handling a POST, you check the Token again to see if it matches the email address, and assign the proper ROLE when creating the User.
public function signupAction($token) {
// 1. Get the Token entity matching the $token variable
// 2. Create the correct form type
// 3. Display the correct twig for GET, assign correct ROLE to new User for POST
}
But you can't use FOSUserBundle as-is. You will have to overwrite the registration process. You can read the FOSUserBundle documentation about that.
What's certain is that, for every invitation you send, you should keep a token with a matching email address and ROLE (the role you want to give to that person).
I have configured request tracker4 to be an interdepartmental helpdesk solution. The current setup is that users will login to RT using LDAP. Once logged in there account is automatically created. However, their account is created with no privileges.
To fix this I have been having to go to Tools-->Configuration-->Select then put in the users DN name and clicking add I then have to check the box "Let this user be granted rights (Privileged)" I have also tried setting Set($AutoCreate, Privileged); but no luck.
I looked at the user accounts in the sqlite database and noticed that when new user logs in they are indeed created in the database. But with no privileges.
709|tuser3|*NO-PASSWORD*|||||||tuser3|||||||tuser3||tuser3|||||||||||||1|2013-03-08 13:47:38|1|2013-03-08 13:47:38
791|Mayra|*NO-PASSWORD*||||Mayra#**************||Main Office|Mayra Hernandez|||||||Mayra||Mayra||**************|||||||||||1|2013-04-03 21:46:36|1|2013-04-03 21:46:36
797|sdrakeford|*NO-PASSWORD*||Autocreated when added as a watcher||sdrakeford#**************|||Sophia C. Drakeford|||||||sdrakeford||sdrakeford|||||||||||||1|2013-04-04 13:18:58|1|2013-04-04 13:18:58
827|Robert.Troy|*NO-PASSWORD*||||Robert.Troy#*******************||Main Office|Robert Troy|||||||Robert.Troy||Robert.Troy||***************|||||||||||1|2013-04-04 16:11:58|1|2013-04-04 16:11:59
Am I missing something, because usually these things are quite obvious.
The $AutoCreate option takes a hashref with all of the default options you want to pass to the User Create method. Try something like:
Set($AutoCreate, {
Privileged => 1
});
(As an aside, it's generally not recommended to run a production instance on sqlite. You might want to consider converting to MySQL or Postgres.)
Whats up.
I'm looking for some information about linking a vBulletin user database with my actual website's database. I do already have a users table, users have their main website profiles and all, but I would also like them to be able to use the same account on the forum (forum not up yet)
So is it fairly simple to do that? I'm simply asking because I have no clue, and don't know where to start!
Any help would be really appreciated!
unless you want to do some serious editing to the vbulletin code i suggest using vbulletin's user table for everything. if you did the main site yourself it should be alot easier for you to edit it then to edit vb.
just connect to the database like normal. then use mysql to check their username/password like so:
SELECT * FROM `usertable` WHERE `username` = '$username' AND `password` = MD5(CONCAT(MD5('$password'),salt)) LIMIT 1
if you need to include extra data for your main site be careful just adding rows to the user table as vbulletin doesnt like that. few ways around it
make a vb plugin to the "userdata_start" hook with this code:
$this->validfields['custom_usertable_row'] = array(TYPE_INT, REQ_YES);
change TYPE_INT if your not saving an integer. and REQ_YES if the row can be null.
add custom user profile fields. from the admincp User Profile Fields>Add User Profile Field
it will add the field to a different table called userfield which you can get by joining the tables in a query
SELECT user.username, userfield.field1 FROM user LEFT JOIN userfield ON user.userid=userfield.userid
make your own table and join like above.
I'm new to using SugarCRM. I want to have a users page that does the following:
Allow a user to create sub-users, and each sub-user can then create additional sub users
Display users in an expandable and collapse-able hierarchical tree structure
Add more attributes to each user
Any newly created user should be able to login to SugarCRM using sugar's existing authentication.
Does anyone know how to do this? Or if they can recommend tutorials/resources for me to study?
John, you will need a one to many relationship based on a custom module.
One user can create a sub user.
So begin by defininig that module and relationship inside of SugarCRM studio.
Once this is defined if you try to throw a subpanel on the Users module you will notice an add / delete / edit button, allowing you to add / delete sub users.
To add more attributes to your user you simply go into studio, select that module and add _c (custom fields) to the corresponding table. You can add custom text, int, long, float, varchar, etc fields.