dongyan1808 2016-06-05 12:24
浏览 52
已采纳

每季度报告而不是每年一次

I am using reporting in Moodle 2.8. Some guy before me created the report, which shows the summ of all seminar days from 3 different plugins, where the numbers are put just in a fields (and not complexly calculated). So I get the following table:

  Username  | Seminar Days | Year
    --------+--------------+----------
    John    | 3            | 2013
    Maria   | 5            | 2013
    Paul    | 7            | 2012

The day are calculated by getting the days field from each seminar (and each from the 3 plugins), first with the following join we get the year:

                                              'dateyear',
                                              'LEFT',
                                              '(SELECT DISTINCT YEAR(datefrom) AS year FROM {attendance} UNION ' .
                                                '(SELECT DISTINCT YEAR(FROM_UNIXTIME(timestart)) AS year FROM {seminar_paricipants}) UNION ' .
                                                '(SELECT DISTINCT YEAR(datefrom) AS year FROM {private_seminars}))',
                                              '1',
                                              REPORT_BUILDER_RELATION_ONE_TO_MANY

And the calculate the days with two more joins from the 3 plugins we have and display them in the column seminar days with CASE WHEN... to check if some ar empty.

Is it possible to build filter function, so we can filter in the year on quarter(i.e from 01.01 until 31.03, from 01.04 until 31.06 etc.) basis?

  • 写回答

1条回答 默认 最新

  • duangao8359 2016-06-05 17:06
    关注

    The code above is Totara rather than Moodle. Its a distribution of Moodle.

    There is a very useful developers guide for report builder available from your partner or from Totara.

    Do you know who your Totara partner is?

    https://www.totaralms.com/partners

    If you don't know the partner then I would suggest registering on the Totara community forums and asking for their advice.

    https://community.totaralms.com/login/index.php

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来