Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/cadet_web/views/assessments_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ defmodule CadetWeb.AssessmentsView do
maxTeamSize: :max_team_size,
hasVotingFeatures: :has_voting_features,
hasTokenCounter: :has_token_counter,
isVotingPublished: &is_voting_assigned(&1.id)
isVotingPublished: &is_voting_assigned(&1.id),
hoursBeforeEarlyXpDecay: & &1.config.hours_before_early_xp_decay
})
end

Expand Down
7 changes: 5 additions & 2 deletions test/cadet_web/controllers/assessments_controller_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ defmodule CadetWeb.AssessmentsControllerTest do
"earlySubmissionXp" => &1.config.early_submission_xp,
"hasVotingFeatures" => &1.has_voting_features,
"hasTokenCounter" => &1.has_token_counter,
"isVotingPublished" => Assessments.is_voting_published(&1.id)
"isVotingPublished" => Assessments.is_voting_published(&1.id),
"hoursBeforeEarlyXpDecay" => &1.config.hours_before_early_xp_decay
}
)

Expand Down Expand Up @@ -173,7 +174,8 @@ defmodule CadetWeb.AssessmentsControllerTest do
"earlySubmissionXp" => &1.config.early_submission_xp,
"hasVotingFeatures" => &1.has_voting_features,
"hasTokenCounter" => &1.has_token_counter,
"isVotingPublished" => Assessments.is_voting_published(&1.id)
"isVotingPublished" => Assessments.is_voting_published(&1.id),
"hoursBeforeEarlyXpDecay" => &1.config.hours_before_early_xp_decay
}
)

Expand Down Expand Up @@ -289,6 +291,7 @@ defmodule CadetWeb.AssessmentsControllerTest do
"isVotingPublished" => Assessments.is_voting_published(&1.id),
"earlySubmissionXp" => &1.config.early_submission_xp,
"isGradingPublished" => nil,
"hoursBeforeEarlyXpDecay" => &1.config.hours_before_early_xp_decay,
"isPublished" =>
if &1.config.type == hd(configs).type do
false
Expand Down