Wednesday, October 24, 2012

Refactoring

This week I am doing heavy refactoring on the stats generation and after that I will work on making the UI look better.

I will post the changes I made to the code and explain why.

Friday, October 12, 2012

Weekly Update

The Assignment taking part of the system is done and it is working with backbone so it looks cool.


Beta testing wont be able to start with classrooms because we don't have enough content digitized yet. However the system works and should be able to accept properly formatted content.

The next step from here is polishing aspects on the tutoring side so that tutors have a better view of how a class/student is doing.
I'm thinking about doing a separate user model for tutors since that way I could separate the controllers and views while still retaining a RESTful functionality.


Monday, October 8, 2012

El Beta

Today I finished most of the views that are going to be used in the beta.
The beta is going to be the following:

1. A user signs_up / signs_in
2. Assignment list is displayed
3. User can take assignment or see stats from a previous one
4. User can see stats after he takes an assignment

Thursday, October 4, 2012

Backbone.js

I finished the UI for taking an exam. The Backbone code looks like this


  questions = new Altair.Collections.QuestionsCollection
  assignments = new Altair.Collections.AssignmentsCollection
  questions.reset(#{@assignment.questions.to_json})
  assignments.reset(#{@assignment.to_json})
  assignment = assignments.get(1)
  answer = new Altair.Collections.AnswersCollection

  $(function() {
  render_question()

  function bind_click(){
  $('.anslink').click( function() {
    ans = $(this).text()
    question = $(this).parent().find(".question_id").val()
    answer.create({'question_id' : question, 'answer' : ans})
   })
   }

  function bind_submit(){
  $('.nextquestion').click( function() {
    assignment.fetch()
    assignment.set({'current_id' : current + 1 })
    assignment.save()
    render_question()
   })
   }

   function render_question(){
    assignment.fetch()
    current = assignment.get('current_id')
    q = questions.get(current)
    r = new Altair.Views.Questions.ShowView({'model': q})
    r.render()
    $('#question').html(r.$el.html())
    rightWrong()
    bind_click()
    bind_submit()
   }
}




Wednesday, October 3, 2012

Backbone.js

This week I'm working with Backbone.js to make a new UI experience when the user "takes" an assignment.

Monday, October 1, 2012

Changes to Exam Model

Yesterday we decided to change how the exams work on the system. It used to be that every exam has a user_id and references a user. Now Exams are only lists of questions and can be referenced to any user. A new joint model called assignment will reference a user and an exam.