{"action":"created","issue":{"url":"https://api.github.com/repos/openwebwork/webwork2/issues/686","repository_url":"https://api.github.com/repos/openwebwork/webwork2","labels_url":"https://api.github.com/repos/openwebwork/webwork2/issues/686/labels{/name}","comments_url":"https://api.github.com/repos/openwebwork/webwork2/issues/686/comments","events_url":"https://api.github.com/repos/openwebwork/webwork2/issues/686/events","html_url":"https://github.com/openwebwork/webwork2/pull/686","id":133060562,"number":686,"title":"Achievement Upgrades","user":{"login":"goehle","id":1774907,"avatar_url":"https://avatars.githubusercontent.com/u/1774907?v=3","gravatar_id":"","url":"https://api.github.com/users/goehle","html_url":"https://github.com/goehle","followers_url":"https://api.github.com/users/goehle/followers","following_url":"https://api.github.com/users/goehle/following{/other_user}","gists_url":"https://api.github.com/users/goehle/gists{/gist_id}","starred_url":"https://api.github.com/users/goehle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goehle/subscriptions","organizations_url":"https://api.github.com/users/goehle/orgs","repos_url":"https://api.github.com/users/goehle/repos","events_url":"https://api.github.com/users/goehle/events{/privacy}","received_events_url":"https://api.github.com/users/goehle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-11T19:09:44Z","updated_at":"2016-05-19T15:15:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openwebwork/webwork2/pulls/686","html_url":"https://github.com/openwebwork/webwork2/pull/686","diff_url":"https://github.com/openwebwork/webwork2/pull/686.diff","patch_url":"https://github.com/openwebwork/webwork2/pull/686.patch"},"body":"This pull requests gives several upgrades to achievements. \r\n 1.  Achievements can now be used with gateway and just-in-time sets.  There is an option when you edit an achievement to select which sets that particular achievement is valid for. \r\n 2.  Achievements are now ordered according to a \"Number\" field.  Its not quite as nice as drag and drop numbering, but its better than being ordered according to the achievement_id field which couldn't be edited.  \r\n 3.  There are now some achievement items for Gateway Tests. \r\n 4.  Other minor changes including: \r\n  -  Using Text::CSV to deal with importing and exporting achievements. \r\n  -  Adding maketext calls to achievement items. \r\n\r\nTo test:  \r\n 1.  Set up a course with achievements already enabled, imported and assigned.  \r\n 2.  Pull this branch and then run a db update on the course.  (The branch adds two new columns to the Achievements table.)  \r\n 3.  Go to the course which had achievements.  The achievements will be missing the number column, but they should still have the same order and if you edit them they should all have the \"homework\" set type enabled.  \r\n 3.  Delete the achievements and import the default achievements.  Check that achievements are imported from the older style file correctly.  \r\n 4.  Set up a new course copying from the latest version of modelCourse\r\n 5.  Import the default achievements from the new course.  They should all have numbers and should  be assigned to appropriate set types if you use \"edit all sets\".  \r\n 6.  Check that you can edit achievements and that all of the fields work correctly.  \r\n 6.  Create an achievement with an evaluator that just contains `return 1;`  Test that you can earn this achievement in all three homework types when that type is enabled for the achievement.  \r\n  -  You can unassign achievements you have earned by clicking in the Edit Users column of Achievement Editors. \r\n 7.  Create an achievement with the evaluator \r\n\r\n  ```\r\n$globalData->{AddNewTestGW} = 1;\r\n$globalData->{ExtendDueDateGW} = 1;\r\n$globalData->{RessurectGW} = 1;\r\nreturn 1;\r\n  ```\r\n  And earn it.  Check that the three new items work.  (Make sure you have items enabled.)\r\n  -  One item gives you an extra version of a gateway per time period. \r\n  -  One item extends the due date of the gateway by 24 hours. \r\n  -  One item reopens a gateway. \r\n\r\n  \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openwebwork/webwork2/issues/comments/220356356","html_url":"https://github.com/openwebwork/webwork2/pull/686#issuecomment-220356356","issue_url":"https://api.github.com/repos/openwebwork/webwork2/issues/686","id":220356356,"user":{"login":"mgage","id":1203580,"avatar_url":"https://avatars.githubusercontent.com/u/1203580?v=3","gravatar_id":"","url":"https://api.github.com/users/mgage","html_url":"https://github.com/mgage","followers_url":"https://api.github.com/users/mgage/followers","following_url":"https://api.github.com/users/mgage/following{/other_user}","gists_url":"https://api.github.com/users/mgage/gists{/gist_id}","starred_url":"https://api.github.com/users/mgage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgage/subscriptions","organizations_url":"https://api.github.com/users/mgage/orgs","repos_url":"https://api.github.com/users/mgage/repos","events_url":"https://api.github.com/users/mgage/events{/privacy}","received_events_url":"https://api.github.com/users/mgage/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T15:15:34Z","updated_at":"2016-05-19T15:15:34Z","body":"3.  When I edit the achievement by clicking on the pencil none of the check boxes (homework, gateway, just in time) are checked. "}}