# HG changeset patch # User Nathan Phillip Brink # Date 2011-04-10 00:34:54 # Node ID 758f11033eb172998c11237348b0c4b6c2e99217 # Parent 73334792195bb2457dab34e0f2b413e7199c5441 When crawling, use `course' instead of `class' in the JSON output. diff --git a/inc/class.course.inc b/inc/class.course.inc --- a/inc/class.course.inc +++ b/inc/class.course.inc @@ -207,7 +207,7 @@ class Course implements IteratorAggregat $recursion_trace[$this->getName()] = TRUE; $json_array = array( - 'class' => $this->getName(), + 'course' => $this->getName(), 'title' => $this->title_get(), 'sections' => array(), 'dependencies' => array(), @@ -244,7 +244,12 @@ class Course implements IteratorAggregat $title = NULL; if (!empty($json['title'])) $title = $json['title']; - $course = new Course($json['class'], $title); + if (!empty($json['class'])) + { + $json['course'] = $json['class']; + unset($json['class']); + } + $course = new Course($json['course'], $title); if (!empty($json['sections'])) $course->section_add(Section::from_json_arrays($json['sections']));