api filter in the course api
The above was really a 2-line change, the
syllabus body sometimes can have links in it
and so it needed to be sent through the
'api_user_content' method in order to get
the right host tacked on to the links rather
than having relative urls.
Also took the time to refactor out course json
generation into it's own class to make
understanding the hash building a little easier
when reading the code. Although much of this
could certainly have simple been written on
the course api module, I was wary of polluting
the namespace of anything else it got included in.
This way all the small methods involved in
building the hash for the JSON are all
encapsulated inside the CourseJson object.
This is an incremental refactor,
there's certainly more that could be done,
but I didn't want to spend too much time on it
since the bug itself was so small.
Change-Id: I158bbd3c9c5a96328eb86a3ac639ade0b3437516
Reviewed-on: https://gerrit.instructure.com/14966
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Vizitei <ethan@12spokes.com>