{"action":"created","comment":{"url":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/comments/28988039","id":28988039,"diff_hunk":"@@ -27,41 +31,35 @@ public function FillBlanks()\n      * function which redefines Question::createAnswersForm\n      * @param the formvalidator instance\n      */\n-    function createAnswersForm($form)\n-    {\n-        $defaults = array();\n-\n-        if (!empty($this->id)) {\n-            $objAnswer = new answer($this->id);\n-\n-            // the question is encoded like this\n-            // [A] B [C] D [E] F::10,10,10@1\n-            // number 1 before the \"@\" means that is a switchable fill in blank question\n-            // [A] B [C] D [E] F::10,10,10@ or  [A] B [C] D [E] F::10,10,10\n-            // means that is a normal fill blank question\n+        function createAnswersForm ($form) {\n+        $fillBlanksAllowedSeparator = self::getAllowedSeparator();\n \n-            $pre_array = explode('::', $objAnswer->selectAnswer(1));\n+\t\t$defaults = array();\n \n-            //make sure we only take the last bit to find special marks\n-            $sz = count($pre_array);\n-            $is_set_switchable = explode('@', $pre_array[$sz-1]);\n-\n-            if ($is_set_switchable[1]) {\n-                $defaults['multiple_answer'] = 1;\n-            } else {\n-                $defaults['multiple_answer'] = 0;\n-            }\n+\t\tif (!empty($this->id)) {\n+\t\t\t$objectAnswer = new answer($this->id);","path":"main/exercice/fill_blanks.class.php","position":43,"original_position":43,"commit_id":"a2fda8cea55560598bf495fcd0e17282a5bafcae","original_commit_id":"a2fda8cea55560598bf495fcd0e17282a5bafcae","user":{"login":"ywarnier","id":609839,"avatar_url":"https://avatars.githubusercontent.com/u/609839?v=3","gravatar_id":"","url":"https://api.github.com/users/ywarnier","html_url":"https://github.com/ywarnier","followers_url":"https://api.github.com/users/ywarnier/followers","following_url":"https://api.github.com/users/ywarnier/following{/other_user}","gists_url":"https://api.github.com/users/ywarnier/gists{/gist_id}","starred_url":"https://api.github.com/users/ywarnier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywarnier/subscriptions","organizations_url":"https://api.github.com/users/ywarnier/orgs","repos_url":"https://api.github.com/users/ywarnier/repos","events_url":"https://api.github.com/users/ywarnier/events{/privacy}","received_events_url":"https://api.github.com/users/ywarnier/received_events","type":"User","site_admin":false},"body":"Indentation must be with spaces, not tabs","created_at":"2015-04-23T18:11:47Z","updated_at":"2015-04-23T18:11:47Z","html_url":"https://github.com/chamilo/chamilo-lms/pull/644#discussion_r28988039","pull_request_url":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/644","_links":{"self":{"href":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/comments/28988039"},"html":{"href":"https://github.com/chamilo/chamilo-lms/pull/644#discussion_r28988039"},"pull_request":{"href":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/644"}}},"pull_request":{"url":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/644","id":32587194,"html_url":"https://github.com/chamilo/chamilo-lms/pull/644","diff_url":"https://github.com/chamilo/chamilo-lms/pull/644.diff","patch_url":"https://github.com/chamilo/chamilo-lms/pull/644.patch","issue_url":"https://api.github.com/repos/chamilo/chamilo-lms/issues/644","number":644,"state":"open","locked":false,"title":"Menu,several choice,resize for Fill the blank question  1.9.10","user":{"login":"baelmyhu","id":4034795,"avatar_url":"https://avatars.githubusercontent.com/u/4034795?v=3","gravatar_id":"","url":"https://api.github.com/users/baelmyhu","html_url":"https://github.com/baelmyhu","followers_url":"https://api.github.com/users/baelmyhu/followers","following_url":"https://api.github.com/users/baelmyhu/following{/other_user}","gists_url":"https://api.github.com/users/baelmyhu/gists{/gist_id}","starred_url":"https://api.github.com/users/baelmyhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baelmyhu/subscriptions","organizations_url":"https://api.github.com/users/baelmyhu/orgs","repos_url":"https://api.github.com/users/baelmyhu/repos","events_url":"https://api.github.com/users/baelmyhu/events{/privacy}","received_events_url":"https://api.github.com/users/baelmyhu/received_events","type":"User","site_admin":false},"body":"Add several features for Fill the blank questions.\r\nSee https://support.chamilo.org/issues/7598\r\n\r\nYou can resize the input field\r\nSee https://chamilosimsu.wordpress.com/2014/06/25/exercice-remplir-les-blancs-choisissez-la-largeur-de-la-zone-de-saisie/\r\n![2015-04-03_1452](https://cloud.githubusercontent.com/assets/4034795/6982361/1aafe1d2-da11-11e4-83ca-276b85272697.png)\r\n\r\nYou can create a menu of choise and allow several answers for an input\r\nSee https://chamilosimsu.wordpress.com/2014/08/26/nouvelles-fonctionnalites-des-exercices-remplir-les-blancs-menu-plusieurs-reponses-possibles-choix-du-separateur/\r\n![2015-04-03_1455](https://cloud.githubusercontent.com/assets/4034795/6982375/47d3d434-da11-11e4-8b88-9e31d1031ae1.png)\r\nMenu : one|tow|three\r\nSeveral right answers : 1||01||one\r\n\r\nYou can choose your separator for answers to replace brackets if you need it as an answer\r\n![2015-04-03_1456](https://cloud.githubusercontent.com/assets/4034795/6982383/5bd2e2c2-da11-11e4-9b2b-b5771aff0fed.png)\r\n\r\n\r\nFor technical aspect see \r\nhttps://docs.google.com/document/d/1XbJE8C5F-3YsMr70gMBGRkR4Tupyiv7tmbxtHt9nmTQ/edit#heading=h.cfmz8ahv85v5\r\n\r\n(It's been used in university for many month now.)\r\n\r\n","created_at":"2015-04-03T12:56:36Z","updated_at":"2015-04-23T18:11:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b9d7e41c8509baaa2231e2e4160f313c586bcb7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/644/commits","review_comments_url":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/644/comments","review_comment_url":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chamilo/chamilo-lms/issues/644/comments","statuses_url":"https://api.github.com/repos/chamilo/chamilo-lms/statuses/a2fda8cea55560598bf495fcd0e17282a5bafcae","head":{"label":"baelmyhu:chamilo19102filltheblank","ref":"chamilo19102filltheblank","sha":"a2fda8cea55560598bf495fcd0e17282a5bafcae","user":{"login":"baelmyhu","id":4034795,"avatar_url":"https://avatars.githubusercontent.com/u/4034795?v=3","gravatar_id":"","url":"https://api.github.com/users/baelmyhu","html_url":"https://github.com/baelmyhu","followers_url":"https://api.github.com/users/baelmyhu/followers","following_url":"https://api.github.com/users/baelmyhu/following{/other_user}","gists_url":"https://api.github.com/users/baelmyhu/gists{/gist_id}","starred_url":"https://api.github.com/users/baelmyhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baelmyhu/subscriptions","organizations_url":"https://api.github.com/users/baelmyhu/orgs","repos_url":"https://api.github.com/users/baelmyhu/repos","events_url":"https://api.github.com/users/baelmyhu/events{/privacy}","received_events_url":"https://api.github.com/users/baelmyhu/received_events","type":"User","site_admin":false},"repo":{"id":16542091,"name":"chamilo-lms","full_name":"baelmyhu/chamilo-lms","owner":{"login":"baelmyhu","id":4034795,"avatar_url":"https://avatars.githubusercontent.com/u/4034795?v=3","gravatar_id":"","url":"https://api.github.com/users/baelmyhu","html_url":"https://github.com/baelmyhu","followers_url":"https://api.github.com/users/baelmyhu/followers","following_url":"https://api.github.com/users/baelmyhu/following{/other_user}","gists_url":"https://api.github.com/users/baelmyhu/gists{/gist_id}","starred_url":"https://api.github.com/users/baelmyhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baelmyhu/subscriptions","organizations_url":"https://api.github.com/users/baelmyhu/orgs","repos_url":"https://api.github.com/users/baelmyhu/repos","events_url":"https://api.github.com/users/baelmyhu/events{/privacy}","received_events_url":"https://api.github.com/users/baelmyhu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/baelmyhu/chamilo-lms","description":"Chamilo is a learning management system focusing on ease of use, re-usability, collaboration and sharing.","fork":true,"url":"https://api.github.com/repos/baelmyhu/chamilo-lms","forks_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/forks","keys_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/teams","hooks_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/hooks","issue_events_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/issues/events{/number}","events_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/events","assignees_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/assignees{/user}","branches_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/branches{/branch}","tags_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/tags","blobs_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/git/refs{/sha}","trees_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/statuses/{sha}","languages_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/languages","stargazers_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/stargazers","contributors_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/contributors","subscribers_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/subscribers","subscription_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/subscription","commits_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/commits{/sha}","git_commits_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/git/commits{/sha}","comments_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/comments{/number}","issue_comment_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/issues/comments{/number}","contents_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/contents/{+path}","compare_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/merges","archive_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/downloads","issues_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/issues{/number}","pulls_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/pulls{/number}","milestones_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/milestones{/number}","notifications_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/labels{/name}","releases_url":"https://api.github.com/repos/baelmyhu/chamilo-lms/releases{/id}","created_at":"2014-02-05T10:49:44Z","updated_at":"2015-03-31T14:53:23Z","pushed_at":"2015-04-03T12:37:17Z","git_url":"git://github.com/baelmyhu/chamilo-lms.git","ssh_url":"git@github.com:baelmyhu/chamilo-lms.git","clone_url":"https://github.com/baelmyhu/chamilo-lms.git","svn_url":"https://github.com/baelmyhu/chamilo-lms","homepage":"http://www.chamilo.org","size":775485,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"1.9.x"}},"base":{"label":"chamilo:1.9.x","ref":"1.9.x","sha":"acd19ea3615c20a00b9bbd6a421b54e48ecfae38","user":{"login":"chamilo","id":3460664,"avatar_url":"https://avatars.githubusercontent.com/u/3460664?v=3","gravatar_id":"","url":"https://api.github.com/users/chamilo","html_url":"https://github.com/chamilo","followers_url":"https://api.github.com/users/chamilo/followers","following_url":"https://api.github.com/users/chamilo/following{/other_user}","gists_url":"https://api.github.com/users/chamilo/gists{/gist_id}","starred_url":"https://api.github.com/users/chamilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamilo/subscriptions","organizations_url":"https://api.github.com/users/chamilo/orgs","repos_url":"https://api.github.com/users/chamilo/repos","events_url":"https://api.github.com/users/chamilo/events{/privacy}","received_events_url":"https://api.github.com/users/chamilo/received_events","type":"Organization","site_admin":false},"repo":{"id":9103211,"name":"chamilo-lms","full_name":"chamilo/chamilo-lms","owner":{"login":"chamilo","id":3460664,"avatar_url":"https://avatars.githubusercontent.com/u/3460664?v=3","gravatar_id":"","url":"https://api.github.com/users/chamilo","html_url":"https://github.com/chamilo","followers_url":"https://api.github.com/users/chamilo/followers","following_url":"https://api.github.com/users/chamilo/following{/other_user}","gists_url":"https://api.github.com/users/chamilo/gists{/gist_id}","starred_url":"https://api.github.com/users/chamilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chamilo/subscriptions","organizations_url":"https://api.github.com/users/chamilo/orgs","repos_url":"https://api.github.com/users/chamilo/repos","events_url":"https://api.github.com/users/chamilo/events{/privacy}","received_events_url":"https://api.github.com/users/chamilo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chamilo/chamilo-lms","description":"Chamilo is a learning management system focusing on ease of use, re-usability, collaboration and sharing.","fork":false,"url":"https://api.github.com/repos/chamilo/chamilo-lms","forks_url":"https://api.github.com/repos/chamilo/chamilo-lms/forks","keys_url":"https://api.github.com/repos/chamilo/chamilo-lms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chamilo/chamilo-lms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chamilo/chamilo-lms/teams","hooks_url":"https://api.github.com/repos/chamilo/chamilo-lms/hooks","issue_events_url":"https://api.github.com/repos/chamilo/chamilo-lms/issues/events{/number}","events_url":"https://api.github.com/repos/chamilo/chamilo-lms/events","assignees_url":"https://api.github.com/repos/chamilo/chamilo-lms/assignees{/user}","branches_url":"https://api.github.com/repos/chamilo/chamilo-lms/branches{/branch}","tags_url":"https://api.github.com/repos/chamilo/chamilo-lms/tags","blobs_url":"https://api.github.com/repos/chamilo/chamilo-lms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chamilo/chamilo-lms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chamilo/chamilo-lms/git/refs{/sha}","trees_url":"https://api.github.com/repos/chamilo/chamilo-lms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chamilo/chamilo-lms/statuses/{sha}","languages_url":"https://api.github.com/repos/chamilo/chamilo-lms/languages","stargazers_url":"https://api.github.com/repos/chamilo/chamilo-lms/stargazers","contributors_url":"https://api.github.com/repos/chamilo/chamilo-lms/contributors","subscribers_url":"https://api.github.com/repos/chamilo/chamilo-lms/subscribers","subscription_url":"https://api.github.com/repos/chamilo/chamilo-lms/subscription","commits_url":"https://api.github.com/repos/chamilo/chamilo-lms/commits{/sha}","git_commits_url":"https://api.github.com/repos/chamilo/chamilo-lms/git/commits{/sha}","comments_url":"https://api.github.com/repos/chamilo/chamilo-lms/comments{/number}","issue_comment_url":"https://api.github.com/repos/chamilo/chamilo-lms/issues/comments{/number}","contents_url":"https://api.github.com/repos/chamilo/chamilo-lms/contents/{+path}","compare_url":"https://api.github.com/repos/chamilo/chamilo-lms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chamilo/chamilo-lms/merges","archive_url":"https://api.github.com/repos/chamilo/chamilo-lms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chamilo/chamilo-lms/downloads","issues_url":"https://api.github.com/repos/chamilo/chamilo-lms/issues{/number}","pulls_url":"https://api.github.com/repos/chamilo/chamilo-lms/pulls{/number}","milestones_url":"https://api.github.com/repos/chamilo/chamilo-lms/milestones{/number}","notifications_url":"https://api.github.com/repos/chamilo/chamilo-lms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chamilo/chamilo-lms/labels{/name}","releases_url":"https://api.github.com/repos/chamilo/chamilo-lms/releases{/id}","created_at":"2013-03-29T17:31:19Z","updated_at":"2015-04-17T19:37:46Z","pushed_at":"2015-04-23T18:07:48Z","git_url":"git://github.com/chamilo/chamilo-lms.git","ssh_url":"git@github.com:chamilo/chamilo-lms.git","clone_url":"https://github.com/chamilo/chamilo-lms.git","svn_url":"https://github.com/chamilo/chamilo-lms","homepage":"http://www.chamilo.org","size":973563,"stargazers_count":83,"watchers_count":83,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":90,"mirror_url":null,"open_issues_count":5,"forks":90,"open_issues":5,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/644"},"html":{"href":"https://github.com/chamilo/chamilo-lms/pull/644"},"issue":{"href":"https://api.github.com/repos/chamilo/chamilo-lms/issues/644"},"comments":{"href":"https://api.github.com/repos/chamilo/chamilo-lms/issues/644/comments"},"review_comments":{"href":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/644/comments"},"review_comment":{"href":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chamilo/chamilo-lms/pulls/644/commits"},"statuses":{"href":"https://api.github.com/repos/chamilo/chamilo-lms/statuses/a2fda8cea55560598bf495fcd0e17282a5bafcae"}}}}