简体   繁体   中英

tiki wiki how to permanently hide a tracker plugin from a user once saved

I'm trying to implement a read confirmation in a number of wiki pages. I'm trying to use trackers.

General Description :

Employees in our company are assigned to read a number of official procedures. I'm trying to implement a process where:

  • Each employee is assigned procedures he needs to read according to his department (Group).
  • Each procedure is a wiki page
  • At the end of each procedure there will be a confirmation form in the following format .
    • Users that don't need to read this procedure won't see this form.
    • Users that confirmed reading the document will see a message like:

      You've confirmed reading this procedure.

  • Administrators will be able to monitor who read what procedure.

Questions :

  1. How do I hide the tracker plugin from users who don't belong to the department (Group)
  2. How do I display a different message once the user confirmed the read

Thanks

There are different way to achieve this and it require a bit of thinking (trade-off from a method to another), but this is what I'll do.

Have 2 groups (before approving - after approving) Display the procedures using a plugin listExecute and having at the end the approving checkbox to have some actions (notification, group changes, etc).

Enclosing everything in a tracker and turn it into a multipage forms can also be the way.

Your case remind me other use case I worked on including Official Procedures reading including quick test (to check if the procedures were understood) and approving mechanism. Look at https://doc.tiki.org/PluginExercise ;)

Good luck Bernard https://www.facebook.com/bsfez

Another, possibly simpler (? ;) way to do that would be to use just plugins group and list, maybe like this:

{GROUP(groups="This Department")}
  {LIST()}
    {filter type="trackeritem"}
    {filter field="tracker_id" content="42"}
    {filter field="tracker_field_procedurePage" content="{{page}}"}
    {filter field="tracker_field_userLogin" content="{{user}}"}
    {OUTPUT()}~tc~Item found, so already done~/tc~You already did this bit{OUTPUT}
    {ALTERNATE()}~tc~Nothing found, show the form~/tc~{tracker trackerId=42 etc...}{ALTERNATE}
  {LIST}
{ELSE}
  You don't need to fill in the form
{GROUP}

This is totally untested i'm afraid, and i'm not 100% sure you can use a plugin in the ALTERNATE section, but give it a go? If it doesn't work, try using {display format="wiki plugin" etc...} which might do the trick - good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM