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:
451 sites
470 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: Tester & Developer
at the OU (Perry building)
Mahmoud Kassaei: Developer
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Amir Elion
    Mon, 20 Aug 2012, 2:33 AM
    Hi Tim,
    Thanks this look like great functionality.
    However, I tried installing on several 2.2 and 2.3 including a fresh 2.3+ install and latest block and report git source.
    When trying to click the Site Admin >> Blocks >> Workflows i get and error reading from database (this is on XAMPP)..
    Debugging on reveals the following:

    Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ILIKE '%email%' || emails.shortname || '%to%'
    ) AS activecount,
    ' at line 5
    SELECT emails.*,
    (
    SELECT COUNT(activescripts.id)
    FROM mdl_block_workflow_steps AS activescripts
    WHERE activescripts.onactivescript ILIKE '%email%' || emails.shortname || '%to%'
    ) AS activecount,
    (
    SELECT COUNT(completescripts.id)
    FROM mdl_block_workflow_steps AS completescripts
    WHERE completescripts.oncompletescript ILIKE '%email%' || emails.shortname || '%to%'
    ) AS completecount
    FROM mdl_block_workflow_emails AS emails
    ORDER BY shortname ASC

    [array (
    )]
    Error code: dmlreadexception
    Stack trace:
    line 407 of \lib\dml\moodle_database.php: dml_read_exception thrown
    line 945 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
    line 162 of \blocks\workflow\classes\email.php: call to mysqli_native_moodle_database->get_records_sql()
    line 49 of \blocks\workflow\manage.php: call to block_workflow_email::load_emails()
  • Tim
    Mon, 20 Aug 2012, 3:42 AM
    So far, we have only run this on Postgres, hence we have not found these thing before. This one is fixable, I guess, when I get a moment.
  • philippe petitqueux
    Mon, 20 Aug 2012, 4:53 AM
    Hello,
    I replaced ILIKE with LIKE in workflow/classes/email.php (4 occurrences) it worked for me with mysql and Moodle 2.2.4.
    But I'm not a developper so...
  • Tim
    Mon, 20 Aug 2012, 8:55 PM
    I just pushed a proper fix to github: https://github.com/moodleou/moodle-block_workflow/commit/554e2ac0332ad3c6a090852d7fb0b28657211908. I won't upload new zips here yet. I will wait to see if any more bugs are found.
  • Amir Elion
    Tue, 21 Aug 2012, 4:48 PM
    Was able to add new workflow now and start editing it. Also saw you updated some documentation, thanks. Advanced featured like auto actions documentation would be great.
  • Roberto Sbravati
    Fri, 24 Aug 2012, 8:20 PM
    Great! But can I find some XML files to import with examples of actions "On step activation" and "On completion step"? Thank'you!!!
  • Tim
    Fri, 24 Aug 2012, 8:23 PM
    I must write those docs. At the moment, all you can do is look in the code: https://github.com/moodleou/moodle-block_workflow/tree/master/classes the command_ classes show what commands are available.
  • Tim
    Fri, 24 Aug 2012, 8:51 PM
    OK, I had to wait for some unit tests to run, so I copied and pasted some docs to http://docs.moodle.org/23/en/The_OU_workflow_system. I hope that makes sense.
  • Amir Elion
    Tue, 28 Aug 2012, 12:39 AM
    Thanks a lot Tim for updating the doc.
  • Heinz Schmolke
    Wed, 31 Oct 2012, 9:34 AM
    I got the same error like Amir and I tried to fix it like Tim has suggested on 20 August but it don't work. Is there a zip file with the fixed problems in progress?
  • Tim
    Tue, 13 Nov 2012, 2:51 AM
    I won't upload a new zip yet, because we are in the middle of implementing a new features.

    In the mean time, you can get a zip of the latest code, including the LIKE bug fix, from https://github.com/moodleou/moodle-block_workflow/archive/master.zip
  • Lewis Hamilton
    Sat, 3 Aug 2013, 6:09 PM
    This is a great plugin. But I need one more feature on this module, can you please implement a way to assign a task or a step to a single user?
Please login to post comments