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

CheckList: if not enabled, the collecting function is still available

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.4.1
    • Fix Version/s: 9.4.3
    • Component/s: Course
    • Labels:
      None

      Description

      If CheckList is not enabled, the collecting function "Multiple checklists" in course editor is still available and the wizard results in a RS. This patch fixes that:

      diff -r ddf5979b265c src/main/java/org/olat/course/editor/EditorMainController.java
      --- a/src/main/java/org/olat/course/editor/EditorMainController.java	Thu Jul 10 14:28:28 2014 +0200
      +++ b/src/main/java/org/olat/course/editor/EditorMainController.java	Wed Jul 16 10:45:50 2014 +0200
      @@ -101,6 +101,7 @@
       import org.olat.course.nodes.CourseNode;
       import org.olat.course.nodes.CourseNodeConfiguration;
       import org.olat.course.nodes.CourseNodeFactory;
      +import org.olat.course.nodes.cl.CheckListCourseNodeConfiguration;
       import org.olat.course.nodes.cl.ui.wizard.CheckListStepRunnerCallback;
       import org.olat.course.nodes.cl.ui.wizard.CheckList_1_CheckboxStep;
       import org.olat.course.run.preview.PreviewConfigController;
      @@ -338,8 +339,11 @@
       
       			toolC.addHeader(translate(NLS_HEADER_INSERTNODES));
       			CourseNodeFactory cnf = CourseNodeFactory.getInstance();
      +			boolean hasCheckList = false;
       			for (String courseNodeAlias : cnf.getRegisteredCourseNodeAliases()) {
       				CourseNodeConfiguration cnConfig = cnf.getCourseNodeConfiguration(courseNodeAlias);
      +				if (cnConfig instanceof CheckListCourseNodeConfiguration) 
      +					hasCheckList = true;
       				try {
       					toolC.addLink(TB_ACTION + courseNodeAlias, cnConfig.getLinkText(ureq.getLocale()), courseNodeAlias, cnConfig.getIconCSSClass());
       				} catch (Exception e) {
      @@ -349,7 +353,8 @@
       			
       			toolC.addHeader(translate(NLS_ADMIN_HEADER));
       			toolC.addLink(CMD_MULTI_SP, translate(NLS_MULTI_SPS), CMD_MULTI_SP, "b_toolbox_copy");
      -			toolC.addLink(CMD_MULTI_CHECKLIST, translate(NLS_MULTI_CHECKLIST), CMD_MULTI_CHECKLIST, "b_toolbox_copy");
      +			if (hasCheckList)
      +				toolC.addLink(CMD_MULTI_CHECKLIST, translate(NLS_MULTI_CHECKLIST), CMD_MULTI_CHECKLIST, "b_toolbox_copy");
       
       			toolC.addHeader(translate(NLS_COMMAND_DELETENODE_HEADER));
       			toolC.addLink(CMD_DELNODE, translate(NLS_COMMAND_DELETENODE), CMD_DELNODE, "b_toolbox_delete");
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            stephan Stephan Clemenz
            Votes:
            0 Vote for this issue
            Watchers:
            2 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