Select the course you want to work in and open the People tool.
Select Tools from the Header Menu and select Invite Students.If you don't see this in the toolbar, you don't have sufficient permissions.
If a registration code doesn't appear, select Generate. Share the code with the students you want to invite; this code works for all users in the course's domain or any subdomain of it.