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

Sorting of authoring view does not work for some columns

    XMLWordPrintable

    Details

      Description

      The sorting of the table in authoring view does not work as expected for the colums creator, access and ac. Creator is not sorted by the real name, but the user name. This is a little confusing.
      AC is mostly sorted by repository entry name, because the DB query does/can not differentiate the methods free access, access code and members only.
      A better sorting of access can be achieved when adding membersonly to "sorted by" in the query:

      diff --git a/src/main/java/org/olat/repository/manager/RepositoryEntryAuthorQueries.java b/src/main/java/org/olat/repository/manager/RepositoryEntryAuthorQueries.java
      --- a/src/main/java/org/olat/repository/manager/RepositoryEntryAuthorQueries.java
      +++ b/src/main/java/org/olat/repository/manager/RepositoryEntryAuthorQueries.java
      @@ -328,9 +328,9 @@
       					break;
       				case access:
       					if(asc) {
      -						sb.append(" order by v.access asc, lower(v.displayname) asc");
      +						sb.append(" order by v.membersOnly asc, v.access asc, lower(v.displayname) asc");
       					} else {
      -						sb.append(" order by v.access desc, lower(v.displayname) desc");
      +						sb.append(" order by v.membersOnly desc, v.access desc, lower(v.displayname) desc");
       					}
       					break;
       				case ac:
      

      Would it be possible to create a DB view for the authoring table?

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m