From 8efc37e3b80a3501a3233c53a6900ffb56a4e106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stian=20Ha=CC=8Aklev?= Date: Wed, 22 Jul 2015 23:40:51 +0800 Subject: [PATCH] Mass mailing design groups --- config/config.exs | 4 ++-- config/prod.exs | 2 +- lib/update_wk3.ex | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/config/config.exs b/config/config.exs index 3e43d38..9ff02f5 100644 --- a/config/config.exs +++ b/config/config.exs @@ -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 } diff --git a/config/prod.exs b/config/prod.exs index 1a2f3ac..6be3c5c 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -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 diff --git a/lib/update_wk3.ex b/lib/update_wk3.ex index 3cacd79..22a4dfe 100644 --- a/lib/update_wk3.ex +++ b/lib/update_wk3.ex @@ -3,6 +3,10 @@ defmodule Survey.Update.Wk3 do @above "

5. What is the activity structure of the lesson?

" @new "

4b. Peer Collaboration

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?

- - - add your response here (delete this line of text) - - -

" + @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.


+ 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. 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? Note that you can always unsubscribe from e-mails with the links at the bottom.


+ Have a great week,


+ The INQ101x MOOC team" def change_text(txt) do if String.contains?(txt, @above) do @@ -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