Issue Details (XML | Word | Printable)

Key: CONTRIB-1020
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Anthony Borrow
Reporter: Mike Worth
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Non-core contributed modules

Create parent accounts block

Created: 09/Feb/09 09:16 PM   Updated: 22/Jun/09 09:34 PM
Component/s: Block: Create parent
Affects Version/s: 1.9.1
Fix Version/s: None

File Attachments: 1. Zip Archive createparent.zip (6 kB)

Image Attachments:

1. createparent-new settings.png
(137 kB)
Environment: Should be universal
Issue Links:
Relates
 

Participants: Anthony Borrow and Mike Worth
Security Level: None
Resolved date: 08/Mar/09
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
A block that allows the creation of parent accounts from just an email address.

Capabilities can be set to allow central administration of parent accounts (user types students name into a search box then can add/delete parent accounts) and/or allow students to add/delete their own parent accounts. Addition and Deletion are different capabilities.

Once configured, simply select a student (or get students to do it themselves) and enter an email address; a user account is created with this address, it is assigned the (configured) parent role and a (configurable) welcome email is sent to the address (with login details)



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Anthony Borrow added a comment - 08/Mar/09 10:45 AM
Mike - One thing that I think may be dangerous for folks is having the default role be administrator. A careless admin could inadvertently give all the parents administrative rights on the server if I am reading this correctly. I would certainly want to warn about this in the installation/usage instructions (which you may have done - I have not looked at those yet). Peace - Anthony

Anthony Borrow added a comment - 08/Mar/09 10:48 AM
Mike - I saw a typo (access) and a small inconsistency (lack of colon after password). I would replace the default email with:

Welcome to [sitename]. A parent account has been created for you for the student [studentname]. To access this account, go to [siteurl] and login with the username: [username] and the password: [password].


Anthony Borrow added a comment - 08/Mar/09 10:49 AM
Also, I could envision some sites not wanting an email to be sent so I would probably give an option to not send an email on account creation. Peace - Anthony

Anthony Borrow added a comment - 08/Mar/09 11:02 AM
I would suggest creating a README.txt file and/or INSTALL.txt file and then follow the standard procedures outlined in http://docs.moodle.org/en/Development:Guidelines_for_contributed_code regarding creating a M&P entry, documentation, etc. I'll add code to CVS, create component, and grant you access to the directory in CVS. Thanks for sharing this useful piece of code. I'm sure there will be plenty of admins that love you. Also, I did see that the parent really only has administrative access at the level of the student; however, I still feel it is not ideal. Peace - Anthony

Anthony Borrow added a comment - 08/Mar/09 11:06 AM
moving to component Block: Create parent

Anthony Borrow added a comment - 08/Mar/09 04:19 PM
code added, component created, CVS write access granted

Mike Worth added a comment - 09/Mar/09 06:05 PM
Thanks for the feedback, m&p entry, docs, readme etc added to todo list.

I can see what you mean about the admin being default, I'd not noticed that- it just defaults to whatever the first entry on the list is which will nearly always be admin. I can't default it to 'parent' as this will need to be created first, I suppose a 'please select a role' entry that won't pass validation would be the best solution.

Thanks,
Mike


Anthony Borrow added a comment - 09/Mar/09 11:53 PM
Parent or select would both work well. Your list of blocks that you are supporting continues to grow. Thanks again for all your work and many contributions to the Moodle community. Peace - Anthony

Mike Worth added a comment - 10/Mar/09 09:33 PM
I've played with it a bit, now it just displays an error in the block if any of the options are undefined (this includes if parentrole is left on 'select a role').

Is there a way to make settings.php validate? addRule doesn't seem to work- I want to make 'select a role' fail validation.

Thanks,
Mike


Anthony Borrow added a comment - 22/Mar/09 04:55 PM
Mike - Actually I removed the select a role option line and then went in to the database and deleted all of the block/createparent entries. When I re-installed the block - ensuring a fresh install I think we get the desired behavior with no risk of them choosing something that does not exist. Would that take care of things? Peace - Anthony

Mike Worth added a comment - 23/Mar/09 07:57 PM
I'm happy to leave it like that- I would expect moodle admins to be aware enough to not to set it to admin accidentally.

Anthony Borrow added a comment - 23/Mar/09 11:10 PM
Mike - Yep, looks fine to me. I also took care of adding some missing language strings for capabilities. Peace - Anthony