File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,14 @@ defmodule Cadet.Updater.XMLParser do
100100 |> Map . put ( :close_at , close_at )
101101 |> Map . put ( :course_id , course_id )
102102 |> Map . put ( :config_id , assessment_config_id )
103-
104- if assessment_params . access === "public" do
105- _ = Map . put ( assessment_params , :password , nil )
106- end
107-
108- if assessment_params . access === "private" and assessment_params . password === nil do
109- _ = Map . put ( assessment_params , :password , "" )
110- end
103+ |> ( & if ( & 1 . access === "public" ,
104+ do: Map . put ( & 1 , :password , nil ) ,
105+ else: & 1
106+ ) ) . ( )
107+ |> ( & if ( & 1 . access === "private" and & 1 . password === nil ,
108+ do: Map . put ( & 1 , :password , "" ) ,
109+ else: & 1
110+ ) ) . ( )
111111
112112 { :ok , assessment_params }
113113 rescue
You can’t perform that action at this time.
0 commit comments