{"action":"opened","issue":{"url":"https://api.github.com/repos/cheshireoctopus/course_mgmt/issues/51","repository_url":"https://api.github.com/repos/cheshireoctopus/course_mgmt","labels_url":"https://api.github.com/repos/cheshireoctopus/course_mgmt/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/cheshireoctopus/course_mgmt/issues/51/comments","events_url":"https://api.github.com/repos/cheshireoctopus/course_mgmt/issues/51/events","html_url":"https://github.com/cheshireoctopus/course_mgmt/issues/51","id":161006529,"number":51,"title":"UI Walk-Through","user":{"login":"mkmoisen","id":2534631,"avatar_url":"https://avatars.githubusercontent.com/u/2534631?v=3","gravatar_id":"","url":"https://api.github.com/users/mkmoisen","html_url":"https://github.com/mkmoisen","followers_url":"https://api.github.com/users/mkmoisen/followers","following_url":"https://api.github.com/users/mkmoisen/following{/other_user}","gists_url":"https://api.github.com/users/mkmoisen/gists{/gist_id}","starred_url":"https://api.github.com/users/mkmoisen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkmoisen/subscriptions","organizations_url":"https://api.github.com/users/mkmoisen/orgs","repos_url":"https://api.github.com/users/mkmoisen/repos","events_url":"https://api.github.com/users/mkmoisen/events{/privacy}","received_events_url":"https://api.github.com/users/mkmoisen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-18T04:40:00Z","updated_at":"2016-06-18T04:40:00Z","closed_at":null,"body":"These are my thoughts on how I anticipated the UI walk-through going.\r\n\r\n## User landing page -- all Courses\r\nA user lands on `/` or `/courses/`. The front end hits the `GET /api/course/` which return a list of courses and their IDs. Except this list is empty because there are no Courses yet.\r\n\r\nSo the user clicks a button indicating he wishes to create a new Course, fills out a name, and hits save. The front end hits the `POST /api/course/` which returns the `id`, which the front end puts in its json object.\r\n\r\n## User clicks on a Course\r\nThe user clicks on one of the Courses in his list. The front end hits the `GET /api/courses/<id>/?data=homework,lecture,class`  where `<id>` is the one obtained earlier from either `GET /api/course/` or `POST /api/course/`, and the API returns all the homework (including `course_homework_id`), lectures (including `course_lecture_id`), and classes for this course. \r\n\r\nThe front end would perhaps display all three in three different columns, or make the user click a button to get more information on one of the three. \r\n\r\nAlternatively, when the user clicks on a course, the front end just displays the three buttons- one for Homeworks, Lectures, and Class, but doesn't hit the back end. Only after the user clicks on Homework, the front end hits `GET /api/homework/?course_id=<id>` which returns the Homeworks (including the `course_homework_id`) for this Course. The same would be true for the Class or Lecture button.\r\n\r\n## User Creates a  Homework from within the Course page\r\nNow our user wants to create some Homeworks for this Course. Recall that previously he clicked on a Course and was shown the Homeworks for this Course. He could click a \"create homework for this course\" button and then fill out a form. The front end would hit `POST /api/homework/` with `{\"data\": [{\"course_id\": <course_id>, \"name\": \"Python Metaclasses\"}]}` and the API would return the `id` of the Homework (as well as the `course_homework_id`). The front end would update its javascript objects with that.\r\n\r\n## User Creates a Class from within the Course Page\r\nNow our user wants to create some Classes for this Course. Recall that previously he clicked on a Course and was shown the Classes for this Course. From this same page he could click a \"create class for this course\" for this course and then fill out a form. The front end would hit `POST /api/class/` with `{\"data\": [{\"course_id\": <course_id>, \"name\": \"Python 101\", ...}]}` and the API would return the `id` of the Class.\r\n\r\n## User clicks on a Class from within the Course Page.\r\nNow the user wants to see the Class details. Recall that previously he clicked on a Course and and was shown the Classes for this Course. When he clicks on Class, the front end hits `GET /api/class/<id>/?data=student,homework,lecture`, where `<id>` is the one obtained earlier either from `GET /api/class/` or `PUT /api/class`, and the API returns all of the Students (along with `class_student_id`), Homeworks (along with `class_homework_id`), and Lectures (along with `class_lecture_id`).\r\n\r\nSimilar to when a user clicks on a Course, the front end would perhaps display all three in three different columns, or make the user click a button to get more information on one of the three.\r\n\r\nAlternatively, when the user clicks on a class, the front end just displays the three buttons- one for Students, Homeworks, and Lectures, but doesn't hit the back end. Only after the user clicks on Homework, the front end hits `GET /api/homework/?class_id=<id>` which returns just the Homeworks (including the `class_homework_id`) for this Class. The same would be true for the Student or Lecture button."}}
{"actor":{"display_login":"mkmoisen"}}