{"action":"created","issue":{"url":"https://api.github.com/repos/steveswinsburg/gradebookNG/issues/202","labels_url":"https://api.github.com/repos/steveswinsburg/gradebookNG/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/steveswinsburg/gradebookNG/issues/202/comments","events_url":"https://api.github.com/repos/steveswinsburg/gradebookNG/issues/202/events","html_url":"https://github.com/steveswinsburg/gradebookNG/issues/202","id":103619317,"number":202,"title":"Student is unable to access category information (score, weight) ","user":{"login":"payten","id":608337,"avatar_url":"https://avatars.githubusercontent.com/u/608337?v=3","gravatar_id":"","url":"https://api.github.com/users/payten","html_url":"https://github.com/payten","followers_url":"https://api.github.com/users/payten/followers","following_url":"https://api.github.com/users/payten/following{/other_user}","gists_url":"https://api.github.com/users/payten/gists{/gist_id}","starred_url":"https://api.github.com/users/payten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/payten/subscriptions","organizations_url":"https://api.github.com/users/payten/orgs","repos_url":"https://api.github.com/users/payten/repos","events_url":"https://api.github.com/users/payten/events{/privacy}","received_events_url":"https://api.github.com/users/payten/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/steveswinsburg/gradebookNG/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/steveswinsburg/gradebookNG/labels/please%20review","name":"please review","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"steveswinsburg","id":129129,"avatar_url":"https://avatars.githubusercontent.com/u/129129?v=3","gravatar_id":"","url":"https://api.github.com/users/steveswinsburg","html_url":"https://github.com/steveswinsburg","followers_url":"https://api.github.com/users/steveswinsburg/followers","following_url":"https://api.github.com/users/steveswinsburg/following{/other_user}","gists_url":"https://api.github.com/users/steveswinsburg/gists{/gist_id}","starred_url":"https://api.github.com/users/steveswinsburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveswinsburg/subscriptions","organizations_url":"https://api.github.com/users/steveswinsburg/orgs","repos_url":"https://api.github.com/users/steveswinsburg/repos","events_url":"https://api.github.com/users/steveswinsburg/events{/privacy}","received_events_url":"https://api.github.com/users/steveswinsburg/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-08-27T23:59:47Z","updated_at":"2015-09-08T01:43:32Z","closed_at":null,"body":"I couldn't find a way for a student to access the category data from the service?  It seems that the user needs `isUserAbleToViewAssignments(gradebookUid)`. Can this be made more permissive? Or is there another way we can get the student's category average and weight as a student user?"},"comment":{"url":"https://api.github.com/repos/steveswinsburg/gradebookNG/issues/comments/138404448","html_url":"https://github.com/steveswinsburg/gradebookNG/issues/202#issuecomment-138404448","issue_url":"https://api.github.com/repos/steveswinsburg/gradebookNG/issues/202","id":138404448,"user":{"login":"payten","id":608337,"avatar_url":"https://avatars.githubusercontent.com/u/608337?v=3","gravatar_id":"","url":"https://api.github.com/users/payten","html_url":"https://github.com/payten","followers_url":"https://api.github.com/users/payten/followers","following_url":"https://api.github.com/users/payten/following{/other_user}","gists_url":"https://api.github.com/users/payten/gists{/gist_id}","starred_url":"https://api.github.com/users/payten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/payten/subscriptions","organizations_url":"https://api.github.com/users/payten/orgs","repos_url":"https://api.github.com/users/payten/repos","events_url":"https://api.github.com/users/payten/events{/privacy}","received_events_url":"https://api.github.com/users/payten/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T01:43:32Z","updated_at":"2015-09-08T01:43:32Z","body":"Ah great, pulling the weight from the assignment works a treat - thanks!\r\n\r\nAs a student, I'm having trouble getting the category average due to the permission error below.  From what I can see, the category average is calculated in `buildGradeMatrix` and then accessible via `gradeInfo.getCategoryAverages().get(myCategoryId)`. Perhaps all we need to do is move that calculation behaviour somewhere else? Or alternatively open up `getCategoryDefinitions` to students?\r\n\r\n    java.lang.SecurityException: You do not have permission to perform this operation\r\n\tat org.sakaiproject.component.gradebook.GradebookServiceHibernateImpl.getCategoryDefinitions(GradebookServiceHibernateImpl.java:2242)\r\n\tat sun.reflect.GeneratedMethodAccessor486.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:497)\r\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)\r\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)\r\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)\r\n\tat org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)\r\n\tat org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)\r\n\tat org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)\r\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\r\n\tat org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)\r\n\tat com.sun.proxy.$Proxy26.getCategoryDefinitions(Unknown Source)\r\n\tat org.sakaiproject.gradebookng.business.GradebookNgBusinessService.getGradebookCategories(GradebookNgBusinessService.java:292)\r\n\tat org.sakaiproject.gradebookng.business.GradebookNgBusinessService.getGradebookCategories(GradebookNgBusinessService.java:277)\r\n\tat org.sakaiproject.gradebookng.business.GradebookNgBusinessService.buildGradeMatrix(GradebookNgBusinessService.java:576)"}}