uw_canvas/reports.py
def get_report_data(self, report):
        """
        Returns a completed report as a list of csv strings.
        """
        if report.report_id is None or report.status is None:
            raise ReportFailureException(report)

        interval = getattr(settings, 'CANVAS_REPORT_POLLING_INTERVAL', 5)
        while report.status != "complete":
            if report.status == "error":
                raise ReportFailureException(report)
            sleep(interval)
            report = self.get_report_status(report)

        if report.attachment is None or report.attachment.url is None:
            return

        data = self._get_report_file(report.attachment.url)

        return data.split("\n")
def get_report_data(self, report):
        """
        Returns a completed report as a list of csv strings.
        """
        if report.report_id is None or report.status is None:
            raise ReportFailureException(report)

        interval = getattr(settings, 'CANVAS_REPORT_POLLING_INTERVAL', 5)
        while report.status != "complete":
            if report.status == "error":
                raise ReportFailureException(report)
            sleep(interval)
            report = self.get_report_status(report)

        if report.attachment is None or report.attachment.url is None:
            return

        data = self._get_report_file(report.attachment.url)

        return data.split("\n")
Returns a completed report as a list of csv strings.