{"action":"created","comment":{"url":"https://api.github.com/repos/claroline/Distribution/pulls/comments/68743768","id":68743768,"diff_hunk":"@@ -96,13 +102,32 @@ public function importQuestion(\\stdClass $data)\n     public function exportQuestion(Question $question, $withSolution = true, $forPaperList = false)\n     {\n         $handler = $this->handlerCollector->getHandlerForInteractionType($question->getType());\n+        $rm = $this->rm;\n \n         $data = new \\stdClass();\n         $data->id = $question->getId();\n         $data->type = $handler->getQuestionMimeType();\n         $data->title = $question->getTitle();\n         $data->description = $question->getDescription();\n         $data->invite = $question->getInvite();\n+        $data->supplementary = $question->getSupplementary();\n+        $data->specification = $question->getSpecification();\n+        $data->objects = array_map(function ($object) use ($rm) {\n+            $resourceObjectData = new \\stdClass();\n+            $resourceObjectData->id = (string) $object->getResourceNode()->getId();\n+            $resourceObjectData->type = $object->getResourceNode()->getMimeType();\n+            $resourceObjectData->name = $object->getResourceNode()->getName();\n+            $resourceObjectData->path = $object->getResourceNode()->getPathForDisplay();\n+            switch ($object->getResourceNode()->getMimeType()) {\n+                case 'custom/hevinci_url':\n+                    $resourceObjectData->resourceUrl = $rm->getResourceFromNode($object->getResourceNode())->getUrl();\n+                    break;\n+                default:\n+                    $resourceObjectData->resourceUrl = $rm->getResourceFromNode($object->getResourceNode())->getHashName();","path":"plugin/exo/Manager/QuestionManager.php","position":67,"original_position":67,"commit_id":"6256f5761903bbcf1568817225bec1b09a04df9b","original_commit_id":"6256f5761903bbcf1568817225bec1b09a04df9b","user":{"login":"Elorfin","id":5363219,"avatar_url":"https://avatars.githubusercontent.com/u/5363219?v=3","gravatar_id":"","url":"https://api.github.com/users/Elorfin","html_url":"https://github.com/Elorfin","followers_url":"https://api.github.com/users/Elorfin/followers","following_url":"https://api.github.com/users/Elorfin/following{/other_user}","gists_url":"https://api.github.com/users/Elorfin/gists{/gist_id}","starred_url":"https://api.github.com/users/Elorfin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elorfin/subscriptions","organizations_url":"https://api.github.com/users/Elorfin/orgs","repos_url":"https://api.github.com/users/Elorfin/repos","events_url":"https://api.github.com/users/Elorfin/events{/privacy}","received_events_url":"https://api.github.com/users/Elorfin/received_events","type":"User","site_admin":false},"body":"The default case needs to be the real URL to access the Resource (from memories, the route claro_resource_open).","created_at":"2016-06-28T12:07:09Z","updated_at":"2016-06-28T12:07:09Z","html_url":"https://github.com/claroline/Distribution/pull/744#discussion_r68743768","pull_request_url":"https://api.github.com/repos/claroline/Distribution/pulls/744","_links":{"self":{"href":"https://api.github.com/repos/claroline/Distribution/pulls/comments/68743768"},"html":{"href":"https://github.com/claroline/Distribution/pull/744#discussion_r68743768"},"pull_request":{"href":"https://api.github.com/repos/claroline/Distribution/pulls/744"}}},"pull_request":{"url":"https://api.github.com/repos/claroline/Distribution/pulls/744","id":75457785,"html_url":"https://github.com/claroline/Distribution/pull/744","diff_url":"https://github.com/claroline/Distribution/pull/744.diff","patch_url":"https://github.com/claroline/Distribution/pull/744.patch","issue_url":"https://api.github.com/repos/claroline/Distribution/issues/744","number":744,"state":"open","locked":false,"title":"Exo question add fields","user":{"login":"eldoniel","id":7665692,"avatar_url":"https://avatars.githubusercontent.com/u/7665692?v=3","gravatar_id":"","url":"https://api.github.com/users/eldoniel","html_url":"https://github.com/eldoniel","followers_url":"https://api.github.com/users/eldoniel/followers","following_url":"https://api.github.com/users/eldoniel/following{/other_user}","gists_url":"https://api.github.com/users/eldoniel/gists{/gist_id}","starred_url":"https://api.github.com/users/eldoniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldoniel/subscriptions","organizations_url":"https://api.github.com/users/eldoniel/orgs","repos_url":"https://api.github.com/users/eldoniel/repos","events_url":"https://api.github.com/users/eldoniel/events{/privacy}","received_events_url":"https://api.github.com/users/eldoniel/received_events","type":"User","site_admin":false},"body":"This adds some fields we used in V5 at innovalangues.\r\n\r\nThe fields are set as follow:\r\n- Functional instruction is set on the \"description\" field.\r\n- Object of the question uses the ObjectQuestion entity, refering to a question and a resourceNode.\r\n- Pedagogic instruction is set on the \"specification\" field.\r\n- Complementary information is set on the \"supplementary\" field.\r\n\r\nThis PR doesn't update the editor in order to fill these fields, it only allows to show existing data in the player.","created_at":"2016-06-28T11:01:39Z","updated_at":"2016-06-28T12:07:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"325244d0e5cafed262dd0ff54f11569f633592cd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/claroline/Distribution/pulls/744/commits","review_comments_url":"https://api.github.com/repos/claroline/Distribution/pulls/744/comments","review_comment_url":"https://api.github.com/repos/claroline/Distribution/pulls/comments{/number}","comments_url":"https://api.github.com/repos/claroline/Distribution/issues/744/comments","statuses_url":"https://api.github.com/repos/claroline/Distribution/statuses/6256f5761903bbcf1568817225bec1b09a04df9b","head":{"label":"claroline:exo-question-add-fields","ref":"exo-question-add-fields","sha":"6256f5761903bbcf1568817225bec1b09a04df9b","user":{"login":"claroline","id":897720,"avatar_url":"https://avatars.githubusercontent.com/u/897720?v=3","gravatar_id":"","url":"https://api.github.com/users/claroline","html_url":"https://github.com/claroline","followers_url":"https://api.github.com/users/claroline/followers","following_url":"https://api.github.com/users/claroline/following{/other_user}","gists_url":"https://api.github.com/users/claroline/gists{/gist_id}","starred_url":"https://api.github.com/users/claroline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claroline/subscriptions","organizations_url":"https://api.github.com/users/claroline/orgs","repos_url":"https://api.github.com/users/claroline/repos","events_url":"https://api.github.com/users/claroline/events{/privacy}","received_events_url":"https://api.github.com/users/claroline/received_events","type":"Organization","site_admin":false},"repo":{"id":54133088,"name":"Distribution","full_name":"claroline/Distribution","owner":{"login":"claroline","id":897720,"avatar_url":"https://avatars.githubusercontent.com/u/897720?v=3","gravatar_id":"","url":"https://api.github.com/users/claroline","html_url":"https://github.com/claroline","followers_url":"https://api.github.com/users/claroline/followers","following_url":"https://api.github.com/users/claroline/following{/other_user}","gists_url":"https://api.github.com/users/claroline/gists{/gist_id}","starred_url":"https://api.github.com/users/claroline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claroline/subscriptions","organizations_url":"https://api.github.com/users/claroline/orgs","repos_url":"https://api.github.com/users/claroline/repos","events_url":"https://api.github.com/users/claroline/events{/privacy}","received_events_url":"https://api.github.com/users/claroline/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/claroline/Distribution","description":"Official Claroline Connect LMS Distribution","fork":false,"url":"https://api.github.com/repos/claroline/Distribution","forks_url":"https://api.github.com/repos/claroline/Distribution/forks","keys_url":"https://api.github.com/repos/claroline/Distribution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/claroline/Distribution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/claroline/Distribution/teams","hooks_url":"https://api.github.com/repos/claroline/Distribution/hooks","issue_events_url":"https://api.github.com/repos/claroline/Distribution/issues/events{/number}","events_url":"https://api.github.com/repos/claroline/Distribution/events","assignees_url":"https://api.github.com/repos/claroline/Distribution/assignees{/user}","branches_url":"https://api.github.com/repos/claroline/Distribution/branches{/branch}","tags_url":"https://api.github.com/repos/claroline/Distribution/tags","blobs_url":"https://api.github.com/repos/claroline/Distribution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/claroline/Distribution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/claroline/Distribution/git/refs{/sha}","trees_url":"https://api.github.com/repos/claroline/Distribution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/claroline/Distribution/statuses/{sha}","languages_url":"https://api.github.com/repos/claroline/Distribution/languages","stargazers_url":"https://api.github.com/repos/claroline/Distribution/stargazers","contributors_url":"https://api.github.com/repos/claroline/Distribution/contributors","subscribers_url":"https://api.github.com/repos/claroline/Distribution/subscribers","subscription_url":"https://api.github.com/repos/claroline/Distribution/subscription","commits_url":"https://api.github.com/repos/claroline/Distribution/commits{/sha}","git_commits_url":"https://api.github.com/repos/claroline/Distribution/git/commits{/sha}","comments_url":"https://api.github.com/repos/claroline/Distribution/comments{/number}","issue_comment_url":"https://api.github.com/repos/claroline/Distribution/issues/comments{/number}","contents_url":"https://api.github.com/repos/claroline/Distribution/contents/{+path}","compare_url":"https://api.github.com/repos/claroline/Distribution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/claroline/Distribution/merges","archive_url":"https://api.github.com/repos/claroline/Distribution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/claroline/Distribution/downloads","issues_url":"https://api.github.com/repos/claroline/Distribution/issues{/number}","pulls_url":"https://api.github.com/repos/claroline/Distribution/pulls{/number}","milestones_url":"https://api.github.com/repos/claroline/Distribution/milestones{/number}","notifications_url":"https://api.github.com/repos/claroline/Distribution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/claroline/Distribution/labels{/name}","releases_url":"https://api.github.com/repos/claroline/Distribution/releases{/id}","deployments_url":"https://api.github.com/repos/claroline/Distribution/deployments","created_at":"2016-03-17T16:17:50Z","updated_at":"2016-06-23T07:17:57Z","pushed_at":"2016-06-28T11:34:25Z","git_url":"git://github.com/claroline/Distribution.git","ssh_url":"git@github.com:claroline/Distribution.git","clone_url":"https://github.com/claroline/Distribution.git","svn_url":"https://github.com/claroline/Distribution","homepage":"http://www.claroline.net","size":59334,"stargazers_count":10,"watchers_count":10,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":209,"forks":6,"open_issues":209,"watchers":10,"default_branch":"master"}},"base":{"label":"claroline:master","ref":"master","sha":"c27386f65371db148f146387ae176b47461702e7","user":{"login":"claroline","id":897720,"avatar_url":"https://avatars.githubusercontent.com/u/897720?v=3","gravatar_id":"","url":"https://api.github.com/users/claroline","html_url":"https://github.com/claroline","followers_url":"https://api.github.com/users/claroline/followers","following_url":"https://api.github.com/users/claroline/following{/other_user}","gists_url":"https://api.github.com/users/claroline/gists{/gist_id}","starred_url":"https://api.github.com/users/claroline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claroline/subscriptions","organizations_url":"https://api.github.com/users/claroline/orgs","repos_url":"https://api.github.com/users/claroline/repos","events_url":"https://api.github.com/users/claroline/events{/privacy}","received_events_url":"https://api.github.com/users/claroline/received_events","type":"Organization","site_admin":false},"repo":{"id":54133088,"name":"Distribution","full_name":"claroline/Distribution","owner":{"login":"claroline","id":897720,"avatar_url":"https://avatars.githubusercontent.com/u/897720?v=3","gravatar_id":"","url":"https://api.github.com/users/claroline","html_url":"https://github.com/claroline","followers_url":"https://api.github.com/users/claroline/followers","following_url":"https://api.github.com/users/claroline/following{/other_user}","gists_url":"https://api.github.com/users/claroline/gists{/gist_id}","starred_url":"https://api.github.com/users/claroline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claroline/subscriptions","organizations_url":"https://api.github.com/users/claroline/orgs","repos_url":"https://api.github.com/users/claroline/repos","events_url":"https://api.github.com/users/claroline/events{/privacy}","received_events_url":"https://api.github.com/users/claroline/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/claroline/Distribution","description":"Official Claroline Connect LMS Distribution","fork":false,"url":"https://api.github.com/repos/claroline/Distribution","forks_url":"https://api.github.com/repos/claroline/Distribution/forks","keys_url":"https://api.github.com/repos/claroline/Distribution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/claroline/Distribution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/claroline/Distribution/teams","hooks_url":"https://api.github.com/repos/claroline/Distribution/hooks","issue_events_url":"https://api.github.com/repos/claroline/Distribution/issues/events{/number}","events_url":"https://api.github.com/repos/claroline/Distribution/events","assignees_url":"https://api.github.com/repos/claroline/Distribution/assignees{/user}","branches_url":"https://api.github.com/repos/claroline/Distribution/branches{/branch}","tags_url":"https://api.github.com/repos/claroline/Distribution/tags","blobs_url":"https://api.github.com/repos/claroline/Distribution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/claroline/Distribution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/claroline/Distribution/git/refs{/sha}","trees_url":"https://api.github.com/repos/claroline/Distribution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/claroline/Distribution/statuses/{sha}","languages_url":"https://api.github.com/repos/claroline/Distribution/languages","stargazers_url":"https://api.github.com/repos/claroline/Distribution/stargazers","contributors_url":"https://api.github.com/repos/claroline/Distribution/contributors","subscribers_url":"https://api.github.com/repos/claroline/Distribution/subscribers","subscription_url":"https://api.github.com/repos/claroline/Distribution/subscription","commits_url":"https://api.github.com/repos/claroline/Distribution/commits{/sha}","git_commits_url":"https://api.github.com/repos/claroline/Distribution/git/commits{/sha}","comments_url":"https://api.github.com/repos/claroline/Distribution/comments{/number}","issue_comment_url":"https://api.github.com/repos/claroline/Distribution/issues/comments{/number}","contents_url":"https://api.github.com/repos/claroline/Distribution/contents/{+path}","compare_url":"https://api.github.com/repos/claroline/Distribution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/claroline/Distribution/merges","archive_url":"https://api.github.com/repos/claroline/Distribution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/claroline/Distribution/downloads","issues_url":"https://api.github.com/repos/claroline/Distribution/issues{/number}","pulls_url":"https://api.github.com/repos/claroline/Distribution/pulls{/number}","milestones_url":"https://api.github.com/repos/claroline/Distribution/milestones{/number}","notifications_url":"https://api.github.com/repos/claroline/Distribution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/claroline/Distribution/labels{/name}","releases_url":"https://api.github.com/repos/claroline/Distribution/releases{/id}","deployments_url":"https://api.github.com/repos/claroline/Distribution/deployments","created_at":"2016-03-17T16:17:50Z","updated_at":"2016-06-23T07:17:57Z","pushed_at":"2016-06-28T11:34:25Z","git_url":"git://github.com/claroline/Distribution.git","ssh_url":"git@github.com:claroline/Distribution.git","clone_url":"https://github.com/claroline/Distribution.git","svn_url":"https://github.com/claroline/Distribution","homepage":"http://www.claroline.net","size":59334,"stargazers_count":10,"watchers_count":10,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":209,"forks":6,"open_issues":209,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/claroline/Distribution/pulls/744"},"html":{"href":"https://github.com/claroline/Distribution/pull/744"},"issue":{"href":"https://api.github.com/repos/claroline/Distribution/issues/744"},"comments":{"href":"https://api.github.com/repos/claroline/Distribution/issues/744/comments"},"review_comments":{"href":"https://api.github.com/repos/claroline/Distribution/pulls/744/comments"},"review_comment":{"href":"https://api.github.com/repos/claroline/Distribution/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/claroline/Distribution/pulls/744/commits"},"statuses":{"href":"https://api.github.com/repos/claroline/Distribution/statuses/6256f5761903bbcf1568817225bec1b09a04df9b"}}}}
{"actor":{"display_login":"Elorfin"}}