-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixed `Assessments.list_assessment_points/1` `strand_id` filter opt - created `Assessments.create_assessment_point_rubric/3` to create rubric and link to assessment point in a single transaction - created `LantternWeb.RubricsComponents` with `<.rubric_descriptors>` component - adjusted rubrics live to use `<.rubric_descriptors>` - created `LantternWeb.StrandLive.StrandRubricsComponent` - adjusted `LantternWeb.Rubrics.RubricFormComponent`, removing the need of `action` assign (which can be inferred from the existence of the rubric id), adding support to `link_to_assessment_point_id` assign, and removing `maybe_push_patch/2` private function in favor of `handle_navigation/1` helper - added migration to fix `assessment_points` `rubric_id` constraint (it was on delete `CASCADE`, it should be `SET NULL`)
- Loading branch information
Showing
15 changed files
with
407 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
defmodule LantternWeb.RubricsComponents do | ||
use Phoenix.Component | ||
|
||
import LantternWeb.CoreComponents | ||
|
||
alias Lanttern.Rubrics.Rubric | ||
|
||
@doc """ | ||
Renders rubric descriptors. | ||
""" | ||
attr :rubric, Rubric, required: true, doc: "Requires descriptors + ordinal_value preloads" | ||
attr :class, :any, default: nil | ||
|
||
def rubric_descriptors(assigns) do | ||
~H""" | ||
<div class={["flex items-stretch gap-2", @class]}> | ||
<div :for={descriptor <- @rubric.descriptors} class="flex-[1_0] flex flex-col items-start gap-2"> | ||
<%= if descriptor.scale_type == "numeric" do %> | ||
<.badge theme="dark"><%= descriptor.score %></.badge> | ||
<% else %> | ||
<.badge style_from_ordinal_value={descriptor.ordinal_value}> | ||
<%= descriptor.ordinal_value.name %> | ||
</.badge> | ||
<% end %> | ||
<.markdown | ||
text={descriptor.descriptor} | ||
class="prose-sm flex-1 w-full p-2 border border-ltrn-lighter rounded-sm bg-ltrn-lightest" | ||
/> | ||
</div> | ||
</div> | ||
""" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.