Skip to content

Commit

Permalink
Mass mailing design groups
Browse files Browse the repository at this point in the history
  • Loading branch information
houshuang committed Jul 22, 2015
1 parent c25c244 commit 8efc37e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ config :logger, :console,
config :jobs,
groups: %{},
default: %{
max_tries: 20,
max_tries: 5,
worker_maxtime: 60,
wait_try_again: 180,
wait_try_again: 1200,
strategy: :backoff
}

Expand Down
2 changes: 1 addition & 1 deletion config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ config :quantum, cron: [
Logger.info("Updating all wiki cache")
Survey.Encore.update_all_wiki_cache
end,
"0,30 * * * *": fn ->
"28,58 * * * *": fn ->
Logger.info("Renewing wiki token")
Survey.Encore.renew_token
end
Expand Down
15 changes: 15 additions & 0 deletions lib/update_wk3.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ defmodule Survey.Update.Wk3 do
@above "<h1>5. What is the activity structure of the lesson?</h1>"
@new "<p><span>4b. Peer Collaboration</span></p><p><span style=\"color: rgb(0,0,0);\"><em>
How will your lesson allow for students to learn from their peers? How will you allow their inquiry products to contribute to peers or the wider classroom community?</em></span></p><p><span style=\"color: rgb(128,0,0);\"> - - - add your response here (delete this line of text) - - -</span></p>"
@content "Welcome to a new week of the design strand. We have added a new welcome page, Etherpad prompts, and wiki prompt (4.2). You can also see any comments your SIG members have left on your design wiki page. (The wiki page shown to SIG members is updated once an hour, and the comments are updated live, so you might get more feedback as you keep improving the page.<P><BR>
We have mentioned the new 'mailing list' functionality in a previous e-mail. If you click on the e-mail button on the collaborative workbench (by the chat window), you can write an e-mail to all your group members. If you reply to that e-mail, the response also goes to all group members. <b>This e-mail is an example - if you respond, the answer will go to all your group members. Perhaps you want to discuss how to proceed, when to meet online, etc?<b> Note that you can always unsubscribe from e-mails with the links at the bottom.<p><br>
Have a great week, <p><br>
<i>The INQ101x MOOC team</i>"

def change_text(txt) do
if String.contains?(txt, @above) do
Expand All @@ -23,4 +27,15 @@ How will your lesson allow for students to learn from their peers? How will you
Survey.DesignGroup.get_all_active
|> Enum.map(fn x -> Survey.Job.add({Survey.Update.Wk3, :change_group, [x]}) end)
end

def mail_all do
Survey.DesignGroup.get_all_active
|> Enum.map(fn x ->
Survey.Job.add({Survey.Update.Wk3, :mail, [x]}) end)
end

def mail(id) do
send_group_email(id, 0, "INQ101x update", "Design Track week 3 is open", content)
end

end

0 comments on commit 8efc37e

Please sign in to comment.