Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-7287

Patch to allow Link tool to pass placement ID so that more than one link tool can operate in a Site

    XMLWordPrintable

    Details

    • Type: Task
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.4.1, 2.5.0
    • Fix Version/s: 2.5.0
    • Component/s: Linktool
    • Labels:
      None

      Description

      Index: src/java/org/sakaiproject/tool/rutgers/LinkTool.java
      ===================================================================
      — src/java/org/sakaiproject/tool/rutgers/LinkTool.java (revision 18530)
      +++ src/java/org/sakaiproject/tool/rutgers/LinkTool.java (working copy)
      @@ -183,6 +183,7 @@
      illegalParams.add("url");
      illegalParams.add("time");
      illegalParams.add("sign");
      + illegalParams.add("placement");

      legalKeys = Pattern.compile("^[a-zA-Z0-9]+$");

      @@ -221,8 +222,12 @@
      // get the Tool
      Placement placement = ToolManager.getCurrentPlacement();
      Properties config = null;

      • if (placement != null)
        + String placementId = "none";
        +
        + if (placement != null) { config = placement.getConfig(); + placementId = placement.getId(); + }

        PrintWriter out = res.getWriter();
        res.setContentType("text/html");

      @@ -305,7 +310,8 @@
      "&role=" + URLEncoder.encode(rolename) +
      "&session=" + URLEncoder.encode(sessionid) +
      "&serverurl=" + URLEncoder.encode(ourUrl) +

      • "&time=" + System.currentTimeMillis();
        + "&time=" + System.currentTimeMillis() +
        + "&placement=" + URLEncoder.encode(placementId);

      // pass on any other arguments from the user.
      // but sanitize them to prevent people from trying to

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                • Assignee:
                  hedrick Charles Hedrick
                  Reporter:
                  ianeboston Ian Boston
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Integration