Skill management

The sending plugin/tutor should have already polled the skill management
plugin for the skill ID.  This is just a fast way to ensure that what they
are sending is in fact an ID and not a name, rather than sending a request
to the database for what can easily be determined as a bogus ID.

I chose to do it this way to reduce the strain on the skill management
plugin; if every set_initial, trace, and reset message has to poll the
student management plugin first, knowledge tracing in general will see a
massive slowdown for largely redundant calls.  Instead, the tutor should
poll the skill management first, then send that ID to the knowledge tracing
plugin.

Inside the skill management plugin is where A happens.


On Thu, Sep 4, 2014 at 6:29 PM, Raymond Chandler III <
notifications@github.com> wrote:

> In plugins/knowledge_tracing.py:
>
> > @@ -111,17 +118,20 @@ def kt_set_initial_callback(self, message):
> >          except KeyError:
> >              self.send_response(message['message_id'],{"error":"kt_set_initial requires 'sender_entity_id', 'skill', 'probability_known', 'probability_learned', 'probability_guess', 'probability_mistake', and 'student_id'"})
> >              return
> > +        except bson.errors.InvalidId:
>
> Validating that this is an ObjectID doesn't go far enough. You need to
> validate by either A) checking local cache for existence. B) Querying the
> skill manager for existence and storing in cache and C) A + B combined.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/tutorgen/hpit_services/pull/39/files#r17146897>.
>