Some of my students don't have emails. Does anybody know the Fieldname that I should use in my upload file to set "0" for the disable email field?
Whilst I'm here, I can't get a country to show for students even though I put "United States of America' in the "country" field? It just shows blank on the resultant student profile.
Hi Steve,
The enable/disable email fieldname is emailstop, however I'm not sure whether this is available as an upload users optional fieldname.
If all your students are from the United States of America, then the easiest option would be to set the country in the interface section of Administration >> Configuration >> Variables.
The enable/disable email fieldname is emailstop, however I'm not sure whether this is available as an upload users optional fieldname.
If all your students are from the United States of America, then the easiest option would be to set the country in the interface section of Administration >> Configuration >> Variables.
Hi,
At present, the only field names that can be batched uploaded are mentioned in the help file. They are:
username, password, firstname, lastname, email, institution, department, city, country, lang, auth, timezone, idnumber, icq, phone1, phone2, address, url, description, mailformat, maildisplay, htmleditor, autosubscribe, course1, course2, course3, course4, course5, group1, group2, group3, group4, group5
The emailstop field is not implemented yet in the batch upload.
One way to get around this would be to directly massage the database with a SQL command filtering on, say, the description field inserted in the batch upload. However, it would take pretty good knowledge of SQL to do this properly AND safely. Not recommended for the faint of heart
At present, the only field names that can be batched uploaded are mentioned in the help file. They are:
username, password, firstname, lastname, email, institution, department, city, country, lang, auth, timezone, idnumber, icq, phone1, phone2, address, url, description, mailformat, maildisplay, htmleditor, autosubscribe, course1, course2, course3, course4, course5, group1, group2, group3, group4, group5
The emailstop field is not implemented yet in the batch upload.
One way to get around this would be to directly massage the database with a SQL command filtering on, say, the description field inserted in the batch upload. However, it would take pretty good knowledge of SQL to do this properly AND safely. Not recommended for the faint of heart
Bill, thanks for the clarification.
Steve, if the majority of your students don't have email addresses then you may wish to consider disabling email by default. This may be done using phpMyAdmin - simply change the emailstop default to 0 in the table mdl-user.
Steve, if the majority of your students don't have email addresses then you may wish to consider disabling email by default. This may be done using phpMyAdmin - simply change the emailstop default to 0 in the table mdl-user.
Helen,
Thank you for suggesting this solution! We're looking to scale up our Moodle deployment to a large test community. Most of our students do not have e-mail accounts (none are provided by the school district), so we needed an efficient way to prevent an avalanche of bounced e-mail notifications. Your suggestion makes it so that we can import student IDs from CSV files, without the need to manually edit each student to disable e-mail. Life just got better.
Thank you for suggesting this solution! We're looking to scale up our Moodle deployment to a large test community. Most of our students do not have e-mail accounts (none are provided by the school district), so we needed an efficient way to prevent an avalanche of bounced e-mail notifications. Your suggestion makes it so that we can import student IDs from CSV files, without the need to manually edit each student to disable e-mail. Life just got better.
If you disable email by default, are people able to add it in their profile?
I have posted a similar question regarding disabling email addresses in the upload file. Ref: http://moodle.org/mod/forum/discuss.php?d=19431#245796
I have successfully modified the uploaduser.php file to include the 'emailstop' field in the $optional = array as follows:
$optional = array("idnumber" => 1,
"icq" => 1,
"phone1" => 1,
"phone2" => 1,
"address" => 1,
"url" => 1,
"description" => 1,
"mailformat" => 1,
"maildisplay" => 1,
"htmleditor" => 1,
"autosubscribe" => 1,
"idnumber" => 1,
"icq" => 1,
"course1" => 1,
"course2" => 1,
"course3" => 1,
"course4" => 1,
"course5" => 1,
"group1" => 1,
"group2" => 1,
"group3" => 1,
"group4" => 1,
"group5" =>1,
"emailstop" =>1);
I then upload the students with the 'emailstop' as 1.
Good luck with this.
Teresa
I have successfully modified the uploaduser.php file to include the 'emailstop' field in the $optional = array as follows:
$optional = array("idnumber" => 1,
"icq" => 1,
"phone1" => 1,
"phone2" => 1,
"address" => 1,
"url" => 1,
"description" => 1,
"mailformat" => 1,
"maildisplay" => 1,
"htmleditor" => 1,
"autosubscribe" => 1,
"idnumber" => 1,
"icq" => 1,
"course1" => 1,
"course2" => 1,
"course3" => 1,
"course4" => 1,
"course5" => 1,
"group1" => 1,
"group2" => 1,
"group3" => 1,
"group4" => 1,
"group5" =>1,
"emailstop" =>1);
I then upload the students with the 'emailstop' as 1.
Good luck with this.
Teresa
Teresa,
How does one find the uploaduser.php file to edit?
Thanks,
Dave
I don't know if you're still insterested...
You can find uploaduser.php inside the admin folder start at the root of your moodle installation.
Cheers.
You can find uploaduser.php inside the admin folder start at the root of your moodle installation.
Cheers.
Thanks to all for your advice. Much appreciated.
Sorry for reopening such an old discussion, but where is that Administration >> Configuration >> Variables option in Moodle 2?
To set the country in moodle 2:
Site administration > Location > Location settings