Hi, this seems pretty cool. If I wanted to bypass the "launch page" on sco nodes, what would be the best way to go about it?

For example, when I first go to a sco node it goes to something like node/6. There I get a start or a resume button and a table of attempts and such. What if I wanted to make node/6 play the sco without going to something like:
node/6/play/10010

Or would just need to link straight to node/6/play/1000
?

Thanks,

Dallas

Comments

jimbullington’s picture

Status: Active » Needs review

Thank you for the feedback.

This should be corrected after the next dev build later today.

The node/nnn/play link should play/resume the SCO based on the node settings and the user's attempt status.

pandaPowder’s picture

thanks! That is really cool. It makes sense that if you attempt to play it without passing in an existing attempt, based on settings, it would find or create the attempt for you. Works fine for me.

pandaPowder’s picture

I wanted to avoid changing the links to the sco_nodes which were generated by another module, so I simply leveraged your new logic to make going to any sco_node automatically call sco_node_play(); I think this is ok to do...

/**
 * Implements hook_node_view().
 */
function YOUR_MODULE_node_view($node, $build_mode = 'full')
{
	if($node->type === 'sco_node')
	{
		sco_node_play($node->nid);
	}
}

UPDATE -- removed user_access test because I think it is redundant.

pandaPowder’s picture

Status: Needs review » Reviewed & tested by the community

  • jimbullington committed 42838d5 on 7.x-1.x
    #2170745 by jimbullington: rework SCO play logic to allow standalone...
gennadiy’s picture

If we also need to open SCO in the new browser tab in the full screen mode (this is to use the entire screen estate on mobile devices). What would be the best possible way to achieve this functionality, please?
I also opened the separate issue for this question:
https://www.drupal.org/node/2456123

Thank you,
Gennady