[Building Sakai] How to add grade scale to gradebook (Oracle)

Brian Baillargeon bbailla2 at uwo.ca
Fri Aug 10 11:25:43 PDT 2012


I forgot to mention - we're running 2.8.x on Oracle

On 12-08-10 02:09 PM, Mukul Tiwari wrote:
> Paul,
>
> Seems like the table is not auto generating the primary key when it 
> should for GB_GRADE_MAP_T table schema definition. Usually hibernate 
> handles the key generation through Sakai, but when you are running 
> insert directly you'd need to configure Oracle to do it for you.
>
> On Fri, Aug 10, 2012 at 9:24 AM, Paul Dagnall <pdagnall1 at udayton.edu 
> <mailto:pdagnall1 at udayton.edu>> wrote:
>
>     Hi
>     Using Sakai 2.6 (still) We added a record to GB_GRADING_SCALE_T
>     and the corresponding records in GB_GRADING_PERCENTS_T
>
>     By adding the scale info into those two tables we successfully get
>     the new grading scale added to new sites, but there are some sites
>     already created that we'd like this applied to
>
>     SAK-18306 <https://jira.sakaiproject.org/browse/SAK-18306>
>     supplies the following MySQL query to fix this (where 4 is the new
>     scale id):
>
>     insert into GB_GRADE_MAP_T (OBJECT_TYPE_ID, VERSION, GRADEBOOK_ID,
>     GB_GRADING_SCALE_T)
>     select distinct 0,0,GB_GRADEBOOK_T.ID
>     <http://GB_GRADEBOOK_T.ID>,GB_GRADING_SCALE_T.ID
>     <http://GB_GRADING_SCALE_T.ID>
>     from GB_GRADEBOOK_T, GB_GRADING_SCALE_T
>     where (GB_GRADEBOOK_T.ID <http://GB_GRADEBOOK_T.ID>,
>     GB_GRADING_SCALE_T.ID <http://GB_GRADING_SCALE_T.ID>) NOT in
>     (select distinct GRADEBOOK_ID, GB_GRADING_SCALE_T from
>     GB_GRADE_MAP_T where GB_GRADING_SCALE_T=4)
>     AND GB_GRADING_SCALE_T.ID <http://GB_GRADING_SCALE_T.ID> = 4
>
>     But I am having trouble modifying it to work in Oracle without
>     getting:
>
>     Error: ORA-01400: cannot insert NULL into
>     ("SAKAIUSER"."GB_GRADE_MAP_T"."ID")
>
>     The sequence and trigger seem correct since I assume the
>     application is using them. Has anyone done this in Oracle? Thanks.
>
>     Paul Dagnall
>     Application Developer & Administrator
>     University of Dayton
>
>
>     _______________________________________________
>     sakai-dev mailing list
>     sakai-dev at collab.sakaiproject.org
>     <mailto:sakai-dev at collab.sakaiproject.org>
>     http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
>     TO UNSUBSCRIBE: send email to
>     sakai-dev-unsubscribe at collab.sakaiproject.org
>     <mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a
>     subject of "unsubscribe"
>
>
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120810/0bad66cb/attachment.html 


More information about the sakai-dev mailing list