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.

Sunday, September 30, 2012

Subscription App

One of the many tedious aspects of the tutoring business is to schedule the groups of students.

Last week I developed a subscription system that collects several data points on the user and then groups them by ensuring compatibility with other users. If a user is not compatible with any of the current groups the system will create a new one.

I tried to make this app as modular as possible. Each data point collected is actually a model and is unrelated to the other models. Each model has a method called compatible?( model ). The parameter it takes is another model of its own class. It then compares the models and returns true if they are compatible. Comparing two users compares all their sub models for compatibility. Comparing a user to a group compares that user to all the users in the group.

If we want to add more data then we just need to add another model, write its compatibility method, and make the user compatibility check use it.