{"action":"opened","issue":{"url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/150","labels_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/150/comments","events_url":"https://api.github.com/repos/maths/moodle-qtype_stack/issues/150/events","html_url":"https://github.com/maths/moodle-qtype_stack/issues/150","id":112420536,"number":150,"title":"Guard clauses in evaluating the PRTs","user":{"login":"sangwinc","id":781615,"avatar_url":"https://avatars.githubusercontent.com/u/781615?v=3","gravatar_id":"","url":"https://api.github.com/users/sangwinc","html_url":"https://github.com/sangwinc","followers_url":"https://api.github.com/users/sangwinc/followers","following_url":"https://api.github.com/users/sangwinc/following{/other_user}","gists_url":"https://api.github.com/users/sangwinc/gists{/gist_id}","starred_url":"https://api.github.com/users/sangwinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangwinc/subscriptions","organizations_url":"https://api.github.com/users/sangwinc/orgs","repos_url":"https://api.github.com/users/sangwinc/repos","events_url":"https://api.github.com/users/sangwinc/events{/privacy}","received_events_url":"https://api.github.com/users/sangwinc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"sangwinc","id":781615,"avatar_url":"https://avatars.githubusercontent.com/u/781615?v=3","gravatar_id":"","url":"https://api.github.com/users/sangwinc","html_url":"https://github.com/sangwinc","followers_url":"https://api.github.com/users/sangwinc/followers","following_url":"https://api.github.com/users/sangwinc/following{/other_user}","gists_url":"https://api.github.com/users/sangwinc/gists{/gist_id}","starred_url":"https://api.github.com/users/sangwinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangwinc/subscriptions","organizations_url":"https://api.github.com/users/sangwinc/orgs","repos_url":"https://api.github.com/users/sangwinc/repos","events_url":"https://api.github.com/users/sangwinc/events{/privacy}","received_events_url":"https://api.github.com/users/sangwinc/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-10-20T17:34:49Z","updated_at":"2015-10-20T17:34:49Z","closed_at":null,"body":"STACK computes some things from the whole PRT prior to traversing the tree.  E.g. Sans and Tans are computed.  This leads to problems. as we can't have guard clauses. \r\n\r\nWith hindsight, this is very poor design (on my part) and should probably change.\r\n\r\nE.g. see https://github.com/maths/moodle-qtype_stack/blob/master/stack/potentialresponsetree.class.php#L146 \r\n\r\nSee also\r\npublic function get_context_variables($key)\r\nhttps://github.com/maths/moodle-qtype_stack/blob/master/stack/potentialresponsenode.class.php#L282\r\n\r\n\r\n\r\n"}}