aboutsummaryrefslogtreecommitdiff
path: root/course/chapters/06-files-cloud.json
blob: e997b9ceed1a23e428d4b8d95caa4c0890ffb301 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{
  "id": "06-files-cloud",
  "title": "Files, editor, WebDAV",
  "icon": "☁",
  "level": "intermediate",
  "lessons": [
    {
      "id": "6.1",
      "title": "Edit and compare files",
      "objective": "Use the editor and diff tools on the VFS.",
      "minutes": 9,
      "commands": [
        "edit",
        "diff",
        "find",
        "files"
      ],
      "blocks": [
        {
          "type": "text",
          "text": "`edit` opens the VFS editor. `diff` compares two files. `find` searches names; `files` opens the visual browser."
        },
        {
          "type": "cmd",
          "text": "edit hello.txt"
        },
        {
          "type": "cmd",
          "text": "find hello"
        },
        {
          "type": "cmd",
          "text": "diff hello.txt hello.txt"
        },
        {
          "type": "tip",
          "text": "The editor calls the tutorial/file-saved hook, so exercise progress can be detected from a save."
        },
        {
          "type": "cmd",
          "text": "files"
        }
      ],
      "exercise": {
        "instruction": "Search for your file by name.",
        "accept": [
          "find hello",
          "find hello.txt"
        ],
        "check": {
          "type": "command"
        },
        "hint": "Type: find hello"
      },
      "quiz": {
        "q": "Which command opens the visual file manager?",
        "options": [
          "files",
          "ls",
          "cat"
        ],
        "answer": 0
      },
      "sources": [
        "modules/ext/editor.js",
        "modules/ext/diff.js",
        "modules/ext/filemgr.js"
      ]
    },
    {
      "id": "6.2",
      "title": "Cloud sync and login",
      "objective": "Understand WebDAV auth, the space token, and the 401 self-heal path.",
      "minutes": 14,
      "commands": [
        "webdav-login",
        "webdav-config",
        "webdav-status",
        "webdav-push",
        "webdav-backup"
      ],
      "blocks": [
        {
          "type": "text",
          "text": "WebDAV syncs your VFS to your space. The module holds a SPACE token, not your personal token; it refreshes on 401."
        },
        {
          "type": "cmd",
          "text": "webdav-status"
        },
        {
          "type": "cmd",
          "text": "webdav-login"
        },
        {
          "type": "warn",
          "text": "Sessions do not cross browser contexts. If a push 401s, run `webdav-login` in THIS browser, then retry."
        },
        {
          "type": "cmd",
          "text": "webdav-push"
        },
        {
          "type": "cmd",
          "text": "webdav-backup"
        }
      ],
      "exercise": {
        "instruction": "Check the WebDAV status.",
        "accept": [
          "webdav-status"
        ],
        "check": {
          "type": "command"
        },
        "hint": "Type: webdav-status"
      },
      "quiz": {
        "q": "A 401 push usually means…",
        "options": [
          "the file is too big",
          "no session/token in this browser context",
          "WebDAV is disabled"
        ],
        "answer": 1
      },
      "sources": [
        "modules/ext/webdav.js"
      ]
    }
  ]
}