Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-37749

MyMobile theme contains Collapsed Topics contributed plugin code.

XMLWordPrintable

    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Hide
      1. With iPod Touch or other device / simulator confirm that the pre-login screen is as screen shot 'MDL-37749_before_change_before_login.PNG'.
      2. Ensure that the test course (From 'backup-moodle2-course-2-ct-20130205-0959-nu.mbz' or own similar) set to the 'Topics' format.
      3. With iPod Touch or other device / simulator, login and go to the test course, and confirm that the screen is as screen shot 'MDL-37749_before_change_topics.PNG'.
      4. Change the course format of the test course to 'Collapsed Topics' via the 'Edit settings' option of the course.
      5. With iPod Touch or other device / simulator, refresh the test course, and confirm that the screen is as screen shot 'MDL-37749_before_change_topcoll.PNG'.
      6. Logout of Moodle, perform the code changes and do a 'Purge all caches'.
      7. With iPod Touch or other device / simulator confirm that the pre-login screen is as screen shot 'MDL-37749_after_change_before_login.PNG'.
      8. Change the course format of the test course to 'Topics' via the 'Edit settings' option of the course.
      9. With iPod Touch or other device / simulator, login and go to the test course, and confirm that the screen is as screen shot 'MDL-37749_after_change_topics.PNG'.
      10. Change the course format of the test course to 'Collapsed Topics' via the 'Edit settings' option of the course.
      11. With iPod Touch or other device / simulator, refresh the test course, and confirm that the screen is as screen shot 'MDL-37749_after_change_topcoll.PNG'.
      Show
      With iPod Touch or other device / simulator confirm that the pre-login screen is as screen shot ' MDL-37749 _before_change_before_login.PNG' . Ensure that the test course (From 'backup-moodle2-course-2-ct-20130205-0959-nu.mbz' or own similar) set to the 'Topics' format. With iPod Touch or other device / simulator, login and go to the test course, and confirm that the screen is as screen shot ' MDL-37749 _before_change_topics.PNG' . Change the course format of the test course to 'Collapsed Topics' via the 'Edit settings' option of the course. With iPod Touch or other device / simulator, refresh the test course, and confirm that the screen is as screen shot ' MDL-37749 _before_change_topcoll.PNG' . Logout of Moodle, perform the code changes and do a 'Purge all caches'. With iPod Touch or other device / simulator confirm that the pre-login screen is as screen shot ' MDL-37749 _after_change_before_login.PNG'. Change the course format of the test course to 'Topics' via the 'Edit settings' option of the course. With iPod Touch or other device / simulator, login and go to the test course, and confirm that the screen is as screen shot ' MDL-37749 _after_change_topics.PNG' . Change the course format of the test course to 'Collapsed Topics' via the 'Edit settings' option of the course. With iPod Touch or other device / simulator, refresh the test course, and confirm that the screen is as screen shot ' MDL-37749 _after_change_topcoll.PNG' .

      The MyMobile theme contains the following code in 'custom.js':

      //collapsed topic only stuff
      $('div#page-course-view-topcollPAGE').live('pagebeforecreate',function(event, ui){
          $('#page-course-view-topcollPAGE ul.section').attr("data-role", "none");
          $('.section li img').removeClass("ui-li-icon");
          $.getScript('../course/format/topcoll/module.js');
          $('#page-course-view-topcollPAGE tr.cps a').attr("data-role", "button").attr("data-icon", "arrow-r");
          $('#page-course-view-topcollPAGE #thetopics').attr("data-role", "controlgroup");
          $('#page-course-view-topcollPAGE td.cps_centre').each(function(index) {
              var cpsc = $(this).text().replace('<br>','').replace(')','');
              $(this).prev('td').find('a').append('<span class="ui-li-count ui-btn-up-a ui-btn-corner-all">' + cpsc + '</span>');
          });
      });
      

      In 'core.css' the following selectors need to be removed:

      /*collapsed topic format*/
      #thetopics {
          table-layout: inherit !important;
          width: 100%;
          display: block !important;
      }
      #page-course-view-topcollPAGE .section td.content, col.content {
          text-align: left;
          width: 100% !important;
          overflow: hidden;
      }
      #page-course-view-topcollPAGE .section td.content {
          padding: .5em;
      }
      #page-course-view-topcollPAGE td.left.side, #page-course-view-topcollPAGE td.right.side {
          display: none;
      }
      #page-course-view-topcollPAGE tr.cps td a {
          background: none !important;
          color: inherit !important;
          padding: 7px 0 7px 0px !important;
      }
      tr.cps td span {
          font-style: inherit !important;
          font-size: 1.12em !important;
      }
      #page-course-view-topcollPAGE .section.separator, td.cps_centre {
          display: none;
      }
      tr.cps {
          background-color: inherit !important;
          color: inherit !important;
      }
      .opencps .ui-btn-inner .ui-icon-arrow-r {
          background-position: -216px 50%;
      }
      tr.cps td span.ui-li-count {
          font-size: .6em !important;
          right: 12px;
      }
      #page-course-view-topcollPAGE .cps .ui-btn-inner {
          white-space: normal;
      }
      

      It is out of date as Collapsed Topics has moved on and as discussed on MDL-33115, core really should not have code that copes with contributed plugins. I am now in a position to adapt my code both with jQuery and styles to support MyMobile but this code is redundant.

      I'm raising this as a separate issue to MDL-33115 because I believe that MDL-33115 is a container for a whole range of issues that are no longer relevant and this small change would get lost within it. A big thank you to Mary Evans for assisting me with it.

            lazydaisy Mary Evans
            gb2048 Gareth J Barnard
            Dan Poltawski Dan Poltawski
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.