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

Adds stats to the sprint demo rake task #127

Merged
merged 6 commits into from Mar 24, 2015
Merged

Adds stats to the sprint demo rake task #127

merged 6 commits into from Mar 24, 2015

Conversation

nathanstitt
Copy link
Member

No description provided.

@nathanstitt
Copy link
Member Author

The user teacher accessed /api/plans/1 and got:

{
  "id": 4,
  "type": "reading",
  "opens_at": "2015-03-24T21:20:11.074Z",
  "due_at": "2015-03-31T21:20:11.074Z",
  "settings": {
    "page_ids": [
      1,
      2,
      3
    ]
  },
  "stats": {
    "course": {
      "total_count": 31,
      "complete_count": 16,
      "partially_complete_count": 16,
      "current_pages": [
        {
          "page": {
            "id": 1,
            "number": 1,
            "title": "Introduction"
          },
          "student_count": 0,
          "correct_count": 0,
          "incorrect_count": 0
        },
        {
          "page": {
            "id": 2,
            "number": 2,
            "title": "Force"
          },
          "student_count": 31,
          "correct_count": 14,
          "incorrect_count": 2
        },
        {
          "page": {
            "id": 3,
            "number": 3,
            "title": "Newton's First Law of Motion: Inertia"
          },
          "student_count": 31,
          "correct_count": 22,
          "incorrect_count": 10
        }
      ],
      "spaced_pages": [
        {
          "page": {
            "id": 0,
            "number": 0,
            "title": ""
          },
          "student_count": 31,
          "correct_count": 51,
          "incorrect_count": 13
        }
      ]
    },
    "periods": [

    ]
  }
}

@nathanstitt nathanstitt changed the title Adds stats to the sprint demo rake task WIP: Adds stats to the sprint demo rake task Mar 24, 2015
@nathanstitt nathanstitt changed the title WIP: Adds stats to the sprint demo rake task Adds stats to the sprint demo rake task Mar 24, 2015
route = "/api/courses/#{outputs[:course1].id}/practice"
api_get(route, student_token)
print_response(outputs[:student], route, response)

first_task_plan = TaskPlan.where(owner: outputs.course1).first
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to target a specific TP without worrying about order, you can just return the task plan of interest from the sprint routine.

jpslav added a commit that referenced this pull request Mar 24, 2015
Adds stats to the sprint demo rake task
@jpslav jpslav merged commit 586ca08 into master Mar 24, 2015
@jpslav jpslav deleted the sprint08-stats-data branch March 24, 2015 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants