Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-80290

Improve the cron logs to auto link urls into links

XMLWordPrintable

    • MOODLE_404_STABLE
    • MDL-80290-task-ui
    • Easy
    • Hide

      Setup

      1.  Install this plugin to help testing:
        https://github.com/catalyst/moodle-tool_testtasks
        on this commit:
        https://github.com/catalyst/moodle-tool_testtasks/commit/d1966cea4742741bf7304d9946736b529a8eac4c

        git clone https://github.com/catalyst/moodle-tool_testtasks admin/tool/testtasks
        cd admin/tool/testtasks
        git checkout d1966cea4742741bf7304d9946736b529a8eac4c

      2. Login as admin, go to Site administration > Server > System paths and set "Path to PHP CLI" with the proper value.

      Testing instructions

      1.  Login as admin
      2. Visit /admin/tool/task/schedule_task.php?task=tool_testtasks%5Ctask%5Cmtrace_task
      3. Click Run now
      4. Confirm the task incrementally emits lines over about a second
      5. Confirm that various urls are auto linked and open in a new window
      6. Confirm that emails are auto linked and open in a new window
      7. Confirm that there is no alert
      8. Run this on the cli to queue up some similar adhoc tasks:
        php admin/tool/testtasks/cli/queue_adhoc_tasks.php --class='tool_testtasks\task\mtrace_task_adhoc' -n=3
      9. Visit /admin/tool/task/adhoctasks.php?classname=%5Ctool_testtasks%5Ctask%5Cmtrace_task_adhoc
      10. Click 'Run all' and 'Run ad hoc tasks now?'
      11. Confirm the task incrementally emits lines over about a second
      12. Confirm that various urls are auto linked and open in a new window
      13. Confirm that emails are auto linked and open in a new window
      14. Confirm that there is no alert
      Show
      Setup  Install this plugin to help testing: https://github.com/catalyst/moodle-tool_testtasks on this commit: https://github.com/catalyst/moodle-tool_testtasks/commit/d1966cea4742741bf7304d9946736b529a8eac4c git clone https: //github.com/catalyst/moodle-tool_testtasks admin/tool/testtasks cd admin/tool/testtasks git checkout d1966cea4742741bf7304d9946736b529a8eac4c Login as admin, go to Site administration > Server > System paths and set "Path to PHP CLI" with the proper value. Testing instructions  Login as admin Visit /admin/tool/task/schedule_task.php?task=tool_testtasks%5Ctask%5Cmtrace_task Click Run now Confirm the task incrementally emits lines over about a second Confirm that various urls are auto linked and open in a new window Confirm that emails are auto linked and open in a new window Confirm that there is no alert Run this on the cli to queue up some similar adhoc tasks: php admin/tool/testtasks/cli/queue_adhoc_tasks.php --class='tool_testtasks\task\mtrace_task_adhoc' -n=3 Visit /admin/tool/task/adhoctasks.php?classname=%5Ctool_testtasks%5Ctask%5Cmtrace_task_adhoc Click 'Run all' and 'Run ad hoc tasks now?' Confirm the task incrementally emits lines over about a second Confirm that various urls are auto linked and open in a new window Confirm that emails are auto linked and open in a new window Confirm that there is no alert

      The output of cron mtrace should be text not html, and if the output contains a url then it would be nice if in the context of the UI logs these were turned into links.

      Might be as simple as running each like through as FORMAT_MOODLE so similar. Markdown might pick up too many other random chars and turn them into things we don't want.

            brendanheywood Brendan Heywood
            brendanheywood Brendan Heywood
            David Adamson David Adamson
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 52 minutes
                52m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.