Ignore:
Timestamp:
Nov 1, 2010, 4:49:52 PM (12 years ago)
Author:
robert@…
Message:

Fixed the random order of templates in the study pages (#135) and created a remote logout call (#158).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/Study.groovy

    r1013 r1036  
    5252        static mapping = {
    5353                autoTimestamp true
     54                sort "title"
    5455
    5556                // Workaround for bug http://jira.codehaus.org/browse/GRAILS-6754
     
    100101         * returns all events and sampling events that do not belong to a group
    101102         */
    102         def Set<Event> getOrphanEvents() {
     103        def List<Event> getOrphanEvents() {
    103104                def orphans =   events.findAll { event -> !event.belongsToGroup(eventGroups) } +
    104105                                                samplingEvents.findAll { event -> !event.belongsToGroup(eventGroups) }
     
    110111         * Return the unique Subject templates that are used in this study
    111112         */
    112         def Set<Template> giveSubjectTemplates() {
     113        def List<Template> giveSubjectTemplates() {
    113114                TemplateEntity.giveTemplates(subjects)
    114115        }
     
    127128         * @return Set
    128129         */
    129         Set<Template> giveAllAssayTemplates() {
     130        List<Template> giveAllAssayTemplates() {
    130131                TemplateEntity.giveTemplates(( (assays) ? assays : [] ))
    131132        }
     
    142143         * Return the unique Event and SamplingEvent templates that are used in this study
    143144         */
    144         Set<Template> giveAllEventTemplates() {
     145        List<Template> giveAllEventTemplates() {
    145146                // For some reason, giveAllEventTemplates() + giveAllSamplingEventTemplates()
    146147                // gives trouble when asking .size() to the result
     
    165166         * Return the unique Event templates that are used in this study
    166167         */
    167         Set<Template> giveEventTemplates() {
     168        List<Template> giveEventTemplates() {
    168169                TemplateEntity.giveTemplates(events)
    169170        }
     
    172173         * Return the unique SamplingEvent templates that are used in this study
    173174         */
    174         Set<Template> giveSamplingEventTemplates() {
     175        List<Template> giveSamplingEventTemplates() {
    175176                TemplateEntity.giveTemplates(samplingEvents)
    176177        }
     
    179180         * Returns the unique Sample templates that are used in the study
    180181         */
    181         Set<Template> giveSampleTemplates() {
     182        List<Template> giveSampleTemplates() {
    182183                TemplateEntity.giveTemplates(samples)
    183184        }
Note: See TracChangeset for help on using the changeset viewer.