Forum OpenACS Development: Re: Social Network Analysis with XoWiki

Collapse
Posted by Claudio Pasolini on
Are there any prerequisites to get the activty and collaboration graph working?

I'm trying with the latest xowiki from head, but the collaboration graph is empty and the activity graph simply redisplay the command {{activity-graph}}.

I noticed that the needed collab-graph.js file is not included.

Collapse
Posted by Gustaf Neumann on
The collaboration graph shows per default the the collaboration of the current user. That might be empty. The activity-graph shows the overall activities in a certain time window. That might be as well empty. Check the collaboration graphs on openacs.org, it runs more or less the newest version of xowiki.

http://www.openacs.org/xowiki/contributors

concering the missing resolving of the {{activity-graph}}: in which kind of page are you including this includelet? Is the HTML clean (e.g. no spans etc. between the braces).

Collapse
Posted by Claudio Pasolini on
Thank you Gustaf,

trying various includelets I copied and pasted the commands and perhaps something was wrong: now I have polished the page and the commands are resolved, but the activity and the collaboration graph are still empty.

The xowiki instance contains a few pages and files and a couple of pages has been edited by different users just to be able to see their collaboration graph.

These are the commands I used:

Activity graph: {{activity-graph}}
Collaboration graph: {{collab-graph}}

and the following is the output:

Activity graph:

Collaborations in last 46 activities by 2 Users in this wiki

... blank space ... Guest Guest (4) Claudio Pasolini (42)

Collaboration graph:

Collaboration Graph for Claudio Pasolini in this wiki(42 contributions)

... blank space ... Guest Guest (4) Claudio Pasolini (42)

I'm using a fresh OpenACS (without dotlrn) instance from Head and there aren't any errors in the error.log.

I had to add the xowiki.css to the ThemeCSS parameter of acs-subsite otherwise it would not be loaded and so I wonder if some other needed file is missing.

Collapse
Posted by Claudio Pasolini on
I forgot to mention that I was experimenting the new layout-manager and that the xowiki instance was mounted under a layout managed subsite.

Xowiki sets correctly the head property, but the tabbed-master.adp of the layout-managed-subsite didn't pass the property on to the plain-master.adp of openacs-default-theme and so some .css and .js were missing.

Now all the needed files are there and the activity graph is rendered as expected, but the collaboration graph is still empty.

Collapse
Posted by Gustaf Neumann on
xowiki is designed to work with 5.4, therefore it depends currently on the backwards-compatibility of the master templates. The master templates was my suspicion when i read your posting, but i had the impression that the existing releases of dotlrn are still backwards compatible. i have not had the time to figure out what the new layout manager does, and i am very short on time to install various configurations until at least may 11th.

What do you mean by empty collaboration graph: I assume, you have still the situation:

Collaboration Graph for Claudio Pasolini in this wiki(42 contributions)
... blank space ...
Guest Guest (4)
Claudio Pasolini (42)
Are there collaborations between Guest and Claudio? In other words, are there pages, to which both Guest and Claudio have contributed to?

-gustaf neumann

Collapse
Posted by Claudio Pasolini on
Yes, there are some pages edited both by me and by Guest.

Wanting to be sure I added a ns_log notice to the body of the query of the includelet and actually there are some items related to two different users.

The following is the specific javascript generated by the xowiki page:

function draw() {
  if (typeof(G_vmlCanvasManager) == "object") {
      G_vmlCanvasManager.init_(window.document);
  }

  var g = new Graph();
g.addEdge($('631'), $('1470'), 41, 0, 5.0);

  var layouter = new Graph.Layout.Spring(g);
  layouter.layout();

  // IE does not pick up the canvas width or height
  $('collab').width=500;
  $('collab').height=500;

  var renderer = new Graph.Renderer.Basic($('collab'), g);
  renderer.radius = 5;
  renderer.draw();
}
 YAHOO.util.Event.addListener(window, 'load', draw);
//   YAHOO.util.Event.onContentReady('collab', draw);

The same context works as expected on oacs-5-4.

Collapse
Posted by Gustaf Neumann on
The "collaboration" is a single edge.

You are sure, you see no javascript error (e.g. with firebug in firefox)? You are sure, this is not a browser issue? If the answer to the above questions is "no js error", "works with oacs-5-4 in the same browser", i would add an "alert('draw');" to the begin of the draw function and check, whether this is called... My suspicion is that there is still something wrong with the master-templates on your site.

Collapse
Posted by Claudio Pasolini on
There are no javascript error.

The draw function is executed (alert box is shown).

The following are the data passed to the graphHTML proc:

nodes=1470 {Guest Guest (6)} 631 {Claudio Pasolini (44)}
edges={631,1470 41 4.1}
Collapse
Posted by Gustaf Neumann on
Claudio, i don't see anything wrong. my guess is that you see the same page content in your working oacs-5-4 version. The collaboration graph code is unchanged since at least 2007. Check the differences in the HTML page of your oacs-5-4 and oacs-5-5 version.