I have the Context_id mapped in the Group Mapping settings to a custom field, but it just doesn't save the id in this field. Every time the LTI is launched and the LTI Provider Tool module can't find the context_id, it creates another group node leading to duplications.

I have looked at the $node object being passed to node_save in the lti_tool_provider_coerll_og_lti_tool_provider_coerll_launch_alter function and it does contain the context_id value. So I am really at a loss why this information doesn't get saved.

Any help is appreciated.

Comments

nsuit created an issue. See original summary.

nsuit’s picture

The group_group field was not selected in the programmatically created group node.
Shouldn't this be set at the time of the creation of the group node in the LTI Tool Provider module?

I could only get the LTI Tool Provider module to work properly when I added the following code on line 190 in lit_tool_provider_og.module:

function lti_tool_provider_coerll_og_lti_tool_provider_coerll_launch_alter(){
...
node_save($node); //part of the module
//Added to make this a group node
$node_loaded = node_load($node->nid);
$node_loaded->group_group[LANGUAGE_NONE][0]['value'] = 1;
node_save($node_loaded);
...
}

Is there a way to fix this without touching the code of the module?

nsuit’s picture

Status: Needs work » Active
kenianbei’s picture

Status: Active » Closed (outdated)

Closing as 7.x is no longer supported.