Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-25336

Code duplication in Gradebook/Edu-services when creating a new gradebook item

    XMLWordPrintable

    Details

      Description

      When making a local modification to the gradebook source I came across the createAssignment() and createAssignmentForCategory() methods in GradebookManagerHibernateImpl that share a lot of code between themselves and with the same methods in the superclass BaseHibernateManager. Attached are two patches that eliminate this duplication in the implementation.

      I did add an extra check for an empty assignment name (see prepareNewAssignment()) which now throws an exception. The column was already marked as not null in the database, so it should just fail earlier now.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bjones86 Brian Jones
                Reporter:
                plukasew Paul Lukasewych
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code