Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-916

Repository table: ordering by "Access" does not work as expected

    XMLWordPrintable

    Details

      Description

      The ordering of repository tables by "Access" does not work properly. Teh following patch fixes that.

      Btw: One can discuss how the ordering of the access column is done. The most elegant way would be ordering by RepositoryEntry.ACC_* adding a constant for "members only".

      The patch:
      diff -r f4e9c6399502 src/main/java/org/olat/repository/RepositoryTableModel.java
      — a/src/main/java/org/olat/repository/RepositoryTableModel.java Mon Dec 16 14:05:18 2013 +0100
      +++ b/src/main/java/org/olat/repository/RepositoryTableModel.java Wed Dec 18 16:57:27 2013 +0100
      @@ -35,6 +35,7 @@
      import java.util.Set;

      import org.olat.core.CoreSpringFactory;
      +import org.olat.core.gui.components.EscapeMode;
      import org.olat.core.gui.components.table.ColumnDescriptor;
      import org.olat.core.gui.components.table.CustomCellRenderer;
      import org.olat.core.gui.components.table.CustomRenderColumnDescriptor;
      @@ -164,9 +165,10 @@
      RepoCols.lifecycleEnd.ordinal(), null, loc, ColumnDescriptor.ALIGNMENT_LEFT, dateRenderer));
      tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.author", RepoCols.author.ordinal(), null, loc));

      • CustomCellRenderer accessRenderer = new RepositoryEntryAccessColumnDescriptor(translator);
      • tableCtr.addColumnDescriptor(new CustomRenderColumnDescriptor("table.header.access", RepoCols.repoEntry.ordinal(), null,
      • loc, ColumnDescriptor.ALIGNMENT_LEFT, accessRenderer));
        + DefaultColumnDescriptor accessDcd = new DefaultColumnDescriptor("table.header.access", RepoCols.access.ordinal(), null,
        + loc, ColumnDescriptor.ALIGNMENT_LEFT);
        + accessDcd.setEscapeHtml(EscapeMode.none);
        + tableCtr.addColumnDescriptor(accessDcd);

      tableCtr.addColumnDescriptor(false, new DefaultColumnDescriptor("table.header.date", RepoCols.creationDate.ordinal(), null, loc));
      tableCtr.addColumnDescriptor(false, new DefaultColumnDescriptor("table.header.lastusage", RepoCols.lastUsage.ordinal(), null, loc));

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              stephan Stephan Clemenz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m