Skip to content

Commit

Permalink
Version 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alxlion committed Dec 28, 2024
1 parent 056b384 commit 5941705
Show file tree
Hide file tree
Showing 98 changed files with 7,992 additions and 2,505 deletions.
1 change: 0 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ MAIL_FROM_NAME=Claper
#[email protected]
#SMTP_PASSWORD=xxx
#SMTP_PORT=465
#SMTP_TLS=if_available

#ENABLE_MAILBOX_ROUTE=false
#MAILBOX_USER=admin
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
--health-timeout 5s
--health-retries 5
env:
ImageOS: ubuntu20
MIX_ENV: test
DATABASE_URL: postgresql://claper:claper@localhost:5432/claper
SECRET_KEY_BASE: QMQE4ypfy0IC1LZI/fygZNvXHPjLslnr49EE7ftcL1wgAC0MwMLdKCVJyrvXPu8z
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
erlang 26.1.2
elixir 1.15.7-otp-26
erlang 26.2.5.6
elixir 1.18.0-otp-26
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
### v.2.3.0

### Features

- Add quizzes interaction with LTI AGS integration and QTI export
- Add join link in manager view to join attendee room more easily
- Export all interactions to CSV in the reports view
- Add Oban for asynchronous jobs (mailer and LMS API calls)

### Fixes and improvements

- New report view with better metrics and tab-view for all interactions
- Improve design improvements for interaction boxes in attendee room
- Fix engagement rate stats
- Add button to trigger product tour instead of automatically starting it
- Improve design and UX for interactions and presentation settings in the manager view
- Add pagination for events on the dashboard
- Fix STMP adapter to work with secure connection
- Add soft delete for user accounts

## v2.2.0

### Features
Expand Down
31 changes: 29 additions & 2 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Hooks.EmbeddedBanner = {

Hooks.TourGuide = {
mounted() {
this.triggerDiv = document.querySelector(this.el.dataset.btnTrigger);
this.btnTrigger = this.triggerDiv.querySelector('.open');
this.closeBtnTrigger = this.triggerDiv.querySelector('.close');

this.tour = new TourGuideClient({
nextLabel: this.el.dataset.nextLabel,
prevLabel: this.el.dataset.prevLabel,
Expand All @@ -77,12 +81,35 @@ Hooks.TourGuide = {
});

if (!this.tour.isFinished(this.el.dataset.group)) {
this.tour.start(this.el.dataset.group);
this.triggerDiv.classList.remove("hidden");
}

this.tour.onBeforeExit(() => {
this.tour.finishTour(true, this.el.dataset.group);
});

this.btnTrigger.addEventListener("click", () => {
this.startTour();
});

this.closeBtnTrigger.addEventListener("click", (e) => {
this.triggerDiv.classList.add("hidden");
this.tour.finishTour(true, this.el.dataset.group);
});
},

startTour() {
this.triggerDiv.classList.add("hidden");
this.tour.start(this.el.dataset.group);
},
destroyed() {
this.btnTrigger.removeEventListener("click", () => {
this.startTour();
});
this.closeBtnTrigger.removeEventListener("click", () => {
this.triggerDiv.classList.add("hidden");
this.tour.finishTour(true, this.el.dataset.group);
});
},
};

Expand All @@ -95,7 +122,7 @@ Hooks.Split = {
const columnSlitValue =
localStorage.getItem(`column-split-${id}`) || "1fr 10px 1fr";
const rowSlitValue =
localStorage.getItem(`row-split-${id}`) || "1fr 10px 1fr";
localStorage.getItem(`row-split-${id}`) || "0.5fr 10px 1fr";

if (type === "column") {
this.columnSplit = Split({
Expand Down
105 changes: 41 additions & 64 deletions assets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ config :claper, ClaperWeb.Gettext,
default_locale: "en",
locales: ~w(fr en de es nl)

config :claper, Oban,
engine: Oban.Engines.Basic,
queues: [default: 10, mailers: 20],
repo: Claper.Repo,
plugins: [
{Oban.Plugins.Pruner, max_age: 60 * 60 * 24 * 7},
{Oban.Plugins.Lifeline, rescue_after: :timer.minutes(30)}
]

config :dart_sass,
version: "1.61.0",
default: [
Expand Down
57 changes: 37 additions & 20 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,37 @@ port = get_int_from_path_or_env(config_dir, "PORT", "4000")

secret_key_base = get_var_from_path_or_env(config_dir, "SECRET_KEY_BASE", nil)

case secret_key_base do
nil ->
raise "SECRET_KEY_BASE configuration option is required. See https://docs.claper.co/configuration.html#production-docker"
if System.get_env("MIX_ENV") == "prod" or Application.get_env(:claper, :server, false) do
case secret_key_base do
nil ->
raise "SECRET_KEY_BASE configuration option is required. See https://docs.claper.co/configuration.html#production-docker"

key when byte_size(key) < 32 ->
raise "SECRET_KEY_BASE must be at least 32 bytes long. See https://docs.claper.co/configuration.html#production-docker"
key when byte_size(key) < 32 ->
raise "SECRET_KEY_BASE must be at least 32 bytes long. See https://docs.claper.co/configuration.html#production-docker"

_ ->
nil
_ ->
nil
end
end

base_url = get_var_from_path_or_env(config_dir, "BASE_URL")
base_url = get_var_from_path_or_env(config_dir, "BASE_URL", "http://localhost:4000")

if !base_url do
raise "BASE_URL configuration option is required. See https://docs.claper.co/configuration.html#production-docker"
if System.get_env("MIX_ENV") == "prod" or Application.get_env(:claper, :server, false) do
case base_url do
nil ->
raise "BASE_URL configuration option is required. See https://docs.claper.co/configuration.html#production-docker"

_ ->
nil
end
end

base_url = URI.parse(base_url)

if base_url.scheme not in ["http", "https"] do
raise "BASE_URL must start with `http` or `https`. Currently configured as `#{System.get_env("BASE_URL")}`"
if System.get_env("MIX_ENV") == "prod" or Application.get_env(:claper, :server, false) do
if base_url.scheme not in ["http", "https"] do
raise "BASE_URL must start with `http` or `https`. Currently configured as `#{System.get_env("BASE_URL")}`"
end
end

max_file_size = get_int_from_path_or_env(config_dir, "MAX_FILE_SIZE_MB", 15)
Expand Down Expand Up @@ -178,17 +188,24 @@ config :claper, ClaperWeb.MailboxGuard,
case mail_transport do
"smtp" ->
config :claper, Claper.Mailer,
adapter: Swoosh.Adapters.SMTP,
adapter: Swoosh.Adapters.Mua,
relay: smtp_relay,
username: smtp_username,
password: smtp_password,
ssl: smtp_ssl,
# always, never, if_available
tls: smtp_tls,
# always, never, if_available
auth: smtp_auth,
port: smtp_port

cond do
smtp_username && smtp_password ->
config :claper, Claper.Mailer, auth: [username: smtp_username, password: smtp_password]

smtp_username || smtp_password ->
raise ArgumentError, """
Both SMTP_USERNAME and SMTP_PASSWORD must be set for SMTP authentication.
Please provide values for both environment variables.
"""

true ->
nil
end

config :swoosh, :api_client, false

"postmark" ->
Expand Down
Loading

0 comments on commit 5941705

Please sign in to comment.