Compare commits
2 Commits
883a2825e5
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| ab91bbf736 | |||
| 57285bf75b |
@@ -20,7 +20,7 @@ defmodule ConfientWeb.DepositController do
|
||||
{:ok, class} ->
|
||||
next_assignments = Confient.Works.get_next_assignments(class)
|
||||
|
||||
if length(next_assignments) > 0 && length(class.students) do
|
||||
if length(next_assignments) > 0 && length(class.students) > 0 do
|
||||
changeset = Confient.Student.Work.changeset(%Confient.Student.Work{}, %{})
|
||||
|
||||
student =
|
||||
|
||||
@@ -7,7 +7,10 @@ defmodule Confient.Deposit do
|
||||
|
||||
def verify_date(due) do
|
||||
date = DateTime.now!(Application.fetch_env!(:confient, :timezone)) |> DateTime.to_date()
|
||||
if Timex.before?(date, due), do: :ok, else: {:error, :date_too_late}
|
||||
|
||||
if Timex.before?(date, due) || Timex.equal?(Timex.to_date(date), due),
|
||||
do: :ok,
|
||||
else: {:error, :date_too_late}
|
||||
end
|
||||
|
||||
def verify_file(file) do
|
||||
|
||||
Reference in New Issue
Block a user