Example #1
0
 def _build_thread(self, data):
     thread = Thread("%s.%s" % (data["commentable_id"], data["id"]))
     thread.title = data["title"]
     thread.date = dateutil.parser.parse(data["created_at"])
     thread.url = self.browser.thread.build(course=self.browser.course, topic=data["commentable_id"], id=data["id"])
     thread.root = self._build_message(data, thread)
     thread._messages_count = data["comments_count"] + 1
     return thread
Example #2
0
 def _build_thread(self, data):
     thread = Thread("%s.%s" % (data["commentable_id"], data["id"]))
     thread.title = data["title"]
     thread.date = dateutil.parser.parse(data["created_at"])
     thread.url = self.browser.thread.build(course=self.browser.course, topic=data["commentable_id"], id=data["id"])
     thread.root = self._build_message(data, thread)
     thread._messages_count = data["comments_count"] + 1
     return thread