Workflow block

Blocks ::: block_workflow
Maintained by TimTim Hunt, Anupama Sarjoshi, at the OU (Perry building)Mahmoud Kassaei
This block allows you to manage the process of producing courses or activities. A workflow make it clear who is responsible for doing the next step, and what tasks they should be doing. The workflow can also assign and unassign roles, or automatically set certain settings, when the workflow moves from one step to the next.
Latest release:
434 sites
282 downloads
74 fans
Current versions available: 9

The Workflow system is used at the OU to manage the production of courses and some activities. It comprises a block and a related admin report.

A workflow (for our purposes) is a linear sequence of steps. A step has

  • a name
  • some instructions;
  • a check-list of actions;
  • a list of roles who are responsible for performing this step;
  • a list of actions that are taken automatically when the step is started/finished, for example assigning roles or changing activity settings.

The system allows the definition of different workflows. Each workflow has

  • a name
  • a description
  • an indication of the type of thing it relates to (e.g. ‘course’, ‘mod_quiz’)

Under Admin -> Plugins -> Blocks -> Workflow, there is an interface for Administrators to define and edit workflows, and to import and export workflow definitions as XML.

To use a workflow to manage the production of, say, a course, you go to the course, and add a workflow block to it. Initially, the block will display a message “There is currently no workflow associated with this course.” with an Add workflow button. Clicking the button allows you to select from any of the workflows that are appropriate for ‘course’.

When the workflow is added to the course, the first step in the workflow becomes active. The workflow block now displays the step instructions for the currently active step; the checklist items as a list of check-boxes; a comments area; a Finish step button; and a link to the workflow overview.

When a step becomes active, all the people responsible for completing the step are sent an email informing them that they should do the step. These people may also get an additional role assigned to them in the context the workflow applies to.

The comments area in the workflow block is a simple editable text area where people working on the step can leave notes for each other.

The Finish step button leads to a confirmation page. If the action is confirmed, then the workflow advances to the next step. When the last step of the workflow is finished, the workflow either stops, or loops back to one of the other steps.

The workflow overview gives an overview of all the steps in this workflow, and the progress through it. The system tracks the timestamp, and the user, each time a step is finished or made active.

The overview page also allows workflow administrators (those with an appropriate capability) to jump the workflow to any particular step.

There is also an admin reports that summarise the workflow across a selection of courses or activities.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4

Contributors

Tim
Tim Hunt (Lead maintainer)
Anupama Sarjoshi: Developer
at the OU (Perry building)
Mahmoud Kassaei: Developer
Please login to view contributors details and/or to contact them

Comments RSS

評論

  • Frank Smith
    2015年12月3日(週四) 21:21
    Hi,
    I recently created a Workflow and made it accessible to a new role, Workflow administrator based on the Teaching Role.
    I've then assigned this Workflow to a GRID formatted course, and assigned one Tutor in the Course as a Workflow Administrator.
    Almost everything works - The Workflow administrator is the only person who can see and action the Workflow, Students can select Grid Items and they open normally.
    However, when teachers select Grid items they do not open in either the normal view or the editing view.
    Can anyone shed any light on this ?
  • Tim
    2015年12月15日(週二) 23:04
    The latest version works fine in Moodle 3.0.
  • Manish Kumar
    2016年03月29日(週二) 14:19
    Hi All,
    I need some urgent help here. Can someone please send me a example of this workflow ? I want to create one for one of my course but unable to do so due to lack in knowledge of coding.
    I have gone through the full documentation and understand that there are some Commands for on step and completion step.
    I tried the test xml mentioned above by Tim , but still unable to get hang of this one.
    PLEASE HELP
    Regards
    Manish Kumar
  • Manish Kumar
    2016年03月29日(週二) 14:27
    JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
    Getting the above error while being logged as Manager

    Unexpected end of input
    Getting the above error while being logged as Admin

    When I click on FINISH STEP

    I have used Atto as well as Tiny to carry above steps but no change



  • Manish Kumar
    2016年03月29日(週二) 14:28
    While clicking on workflow overview I get the error


    Coding error detected, it must be fixed by a programmer: $course passed to moodle_page::set_course does not look like a proper course object.

    More information about this error

    I have installed Workflow Report as well on My Moodle which is 2.9 version
  • Tim
    2016年04月4日(週一) 23:35
    Sorry for the slow reply. I was on holiday.

    1) exmple workflow: It is not a great example, but look at the file tests/fixtures/testworkflow.workflow.xml inside the block folder. Try importing that.

    2) Are you sure that you are using the latest version of this block? The latest version certainly works with Atto.

    3) Where have you added the block? It should be added to a particular course. I have not seen this errors or our system.
  • Tomasz Muras
    2016年08月3日(週三) 02:54
    Hi Tim,
    Just a thought - this page would look nicer if you could add a screenshot or two.
  • Roberto Sbravati
    2017年04月6日(週四) 17:05
    Hi,
    a release for Moodle 3.2 is planned?
    In current release (2016080200) "email" command in step scripts doesn't play. I obtain many error messages like "eventdata as \stdClass is deprecated. Please use core\message\message instead." or similar.

    Thank you!

    Roberto
  • Tim
    2017年04月6日(週四) 17:33
    Yes, a release is planned. Sorry, I cannot promise when, but the OU upgrade to Moodel 3.2 is going live in June, so it will certainly be before then.
  • Roberto Sbravati
    2017年04月6日(週四) 17:41
    Good news!
    Thank you Tim
    Roberto
  • Bryan Simmons
    2017年04月20日(週四) 10:37
    Any advice for bypassing the block system and programmatically using the workflow system?
  • Tim
    2017年04月20日(週四) 16:50
    Bryan, I think that depends on your point of view.

    I would say that the system was not designed with that in mind.

    On the other hand, the system is quite well designed. The block is just a view, and most of the view is generated by a renderer, that would be quite easy to reuse. So, it would be quite easy to re-use the back-end code, and some of the bits of view, in another development. You would just need to work it out.
  • Bryan Simmons
    2017年04月21日(週五) 01:09
    This is what I was hoping to hear! It seems you attach an instance of a workflow to an activity via context id. From there you can simply load the workflow and step through it at will, right?
  • Bryan Simmons
    2017年05月10日(週三) 05:57
    So, for those following or looking for a way to use workflow block outside the block itself, seems you can pass any old number to $workflow->add_to_context($contextid); where contextid is literally any unique number. I'm hoping it works out in the long run. I got stuck for the longest time trying to get a course_module context for an activity object NOT attached to a particular course. I ended up using the unique id of the activity itself as the $contextid.
  • Bryan Simmons
    2017年06月28日(週三) 05:51
    Tim, have you thought about altering the workflow engine so that it's able to support multiple branches? It's currently really linear but I think with a few tweaks it could be made to branch and work quite nicely for literally any workflow need in Moodle.
Please login to post comments