Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finish start here reading #12

Merged
merged 2 commits into from
Jan 25, 2023
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
2 changes: 1 addition & 1 deletion progress.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"task_drills_exercise": false,
"monster_spawner_exercise": false,
"metaprogramming_reading": false,
"start_here_reading": false,
"start_here_reading": true,
"games_supervisor_setup_exercise": false,
"pic_chat_pub_sub_reading": false,
"lists_reading": false,
Expand Down
4 changes: 4 additions & 0 deletions reading/start_here.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ There is a **Commit Your Progress** and a **Mark as Completed** section at the e

However, self-led students can complete these sections if they want to track their progress and get more practice using GitHub. We ask that you don't create pull requests to the DockYard Academy repo, as this spams our PR tracker. If you are not an academy student, we also ask that you refrain from @mentioning the instructor as this spams our notifications, and 1-1 feedback is only available to academy students.

```elixir
2 + 2
```

## Mark As Completed

<!-- livebook:{"attrs":{"source":"file_name = Path.basename(Regex.replace(~r/#.+/, __ENV__.file, \"\"), \".livemd\")\n\nsave_name =\n case Path.basename(__DIR__) do\n \"reading\" -> \"start_here_reading\"\n \"exercises\" -> \"start_here_exercise\"\n end\n\nprogress_path = __DIR__ <> \"/../progress.json\"\nexisting_progress = File.read!(progress_path) |> Jason.decode!()\n\ndefault = Map.get(existing_progress, save_name, false)\n\nform =\n Kino.Control.form(\n [\n completed: input = Kino.Input.checkbox(\"Mark As Completed\", default: default)\n ],\n report_changes: true\n )\n\nTask.async(fn ->\n for %{data: %{completed: completed}} <- Kino.Control.stream(form) do\n File.write!(\n progress_path,\n Jason.encode!(Map.put(existing_progress, save_name, completed), pretty: true)\n )\n end\nend)\n\nform","title":"Track Your Progress"},"chunks":null,"kind":"Elixir.HiddenCell","livebook_object":"smart_cell"} -->
Expand Down