Porting UCD Gradebook changes to 2.3
Details of changes made to 2-1-x:
New Files (classes, etc)
- service/src/java/org/sakaiproject/service/gradebook/shared/GradebookCourseGradeFeedService.java
Abstract class defining string and vector constants for ...
- properties file name and properties keys
- property value delimiter and 'placeholder' property values for 'roster' and 'final' grades respectively
- default column sort order
- enumeration of course metadata column keys
- component/src/java/org/sakaiproject/component/gradebook/GradebookCourseGradeFeedServiceImpl.java
Stub extension of GradebookCourseGradeFeedService
- component/src/java/org/sakaiproject/tool/gradebook/facades/SakaiSiteService.java
Interface for Facade of Sakai SiteService
- getSiteProviderId(): gets current site's provider id from Sakai SiteService
- getSiteTitle(): gets current site's title from Sakai SiteService
- tool/src/java/org/sakaiproject/tool/gradebook/facades/sakai2impl/SiteServiceImpl.java
Implementation of SiteService facade
- getSiteTitle(): uses gradebook id as the site id
- getSiteTitle(): uses gradebook id as the site id
- tool/src/bundle/org/sakaiproject/tool/gradebook/bundle/GradeDownloadConfig.properties
properties bundle for new download options.
- keys with example values:
- export_course_grade_gradebookid_column_name=Site Id
- export_course_grade_siteprovider_column_name=Provider Id
- export_course_grade_sitetitle_column_name=Site Title
- export_course_grade_column_order_keys=export_course_grade_sitetitle_column_name,export_course_grade_gradebookid_column_name,export_course_grade_siteprovider_column_name,export_student_name,export_student_id,course_or_roster,assignments
- course_grade_export_enabled=false
- roster_export_enabled=false
- export_course_grade_ent_submission_enabled=true
- export_course_grade_ent_path=/afs/.ucdavis.edu/app/sakai/gradefiles
- export_course_grade_ent_submission_url=https://ips.ucdavis.edu/CourseManagement/final_submit/fgs_direct_upload.cfm?providerid=export_course_grade_siteprovider_column_name&siteid=export_course_grade_gradebookid_column_name
- keys with example values:
Modifications to pre-existing files
- component-data/src/java/org/sakaiproject/tool/gradebook/Assignment.java
- calculateMean(): changed mean calculation to exclude gradeableObjects with null grades
- component-data/src/java/org/sakaiproject/tool/gradebook/PassNotPassMapping.java
- added UC Davis' 7 kinds of 'pass/no pass' grades (S/U excluded)
- component-data/src/java/org/sakaiproject/tool/gradebook/LetterGradeMapping.java
- component-data/src/java/org/sakaiproject/tool/gradebook/LetterGradePlusMinusMapping.java
- added 5 of UC Davis' 7 kinds of 'pass/no pass' grades (S/U excluded)
- tool/src/bundle/org/sakaiproject/tool/gradebook/bundle/Messages.properties
Added new properties defining for a export filename template which uses column names as placeholders for the implied data for that 'column'. These keys are passed to ExportBean.getCourseMetadataValue(String key) for each data.
Examples:
- #export_filename_sitemetadata_format=export_course_grade_gradebookid_column_name-export_course_grade_siteprovider_column_name
- export_filename_sitemetadata_format=export_course_grade_siteprovider_column_name
- export_filename_sitemetadata_format_delimiter=- (<-- that's a "dash character")
- tool/src/webapp/common/WEB-INF/spring-service.xml
added bean definition for org_sakaiproject_service_gradebook_GradebookCourseGradeFeedService bean
- tool/src/webapp/common/WEB-INF/faces-beans.xml
added faces bean for SiteService facade: org_sakaiproject_tool_gradebook_facades_SakaiSiteService
added injection of org_sakaiproject_tool_gradebook_facades_ContextManagement into SiteService facade
- tool/src/webapp/common/courseGradeDetails.jsp
edited 'rendered' attribute of csv and excel export command buttons to check
(!courseGradeDetailsBean.emptyEnrollments && exportBean.courseGradeDownloadEnabled)added commandButton for 'Enterprise Export/Download' with 'rendered' attribute checking
(!courseGradeDetailsBean.emptyEnrollments && exportBean.courseGradeEntSubmissionEnabled) - tool/src/java/org/sakaiproject/tool/gradebook/ui/ExportBean.java
Summary:
- added property initialization logic to constructor
- added second (boolean) parameter to getAsCsv() and getAsExcel() to switch inclusion of defined course metadata columns in the returned data
- added getOrderedColumns() method to return a List of columns from config files or default settings
- added getCourseMetadataValue(String key) to return appropriate values for metadata keys used in prop files (eg, Site Id, Site Title, Provider Id)
- modified nested loops in getAs*() methods to place grade-able objects based on ordered Column settings