Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.1.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Administration, Themes
    • Labels:
      None
    • Database:
      Any
    • Testing Instructions:
      Hide

      1. Switch theme to Sky High.
      2. Select Report in Site-Administation
      3. Try printing a report (eg: Config Changes as this will have lots of data)
      4. Check to see if print out is incomplete.

      Show
      1. Switch theme to Sky High. 2. Select Report in Site-Administation 3. Try printing a report (eg: Config Changes as this will have lots of data) 4. Check to see if print out is incomplete.
    • Workaround:
      Hide

      A suggested workaround this problem is the following patch by my mentor Dietmar Wagner

      ********************************************
      A patch for the report "Config changes":
      ********************************************
      admin/report/configlog/index.php
      ========================
      @@-12,1 +12,1@@
      - admin_externalpage_setup('reportconfiglog');
      + admin_externalpage_setup('reportconfiglog', '', null, '', array('pagelayout'=>'report'));
      
      

      With the following CSS added to theme/sky_high/style/pagelayout.css

      /* Report layout
      -------------------------*/
      .pagelayout-report #page-content #region-main-box { margin-left: 0px;}
      .pagelayout-report #page-content #region-post-box { margin-left: -[[setting:regionwidth]];}
      .pagelayout-report #page-content #region-main { margin-left: [[setting:regionwidth]];}
      .pagelayout-report #page-content #region-pre { left: [[setting:regionwidth]]; width: [[setting:regionwidth]];}
      .pagelayout-report #page-content #region-post { width: 0%;}
      
      /* Print layout
      -------------------------*/
      @media print {
          .pagelayout-report #page-content #region-main-box { margin-left: 0px;}
          .pagelayout-report #page-content #region-main-box #region-post-box { margin-left: 0px;}
          .pagelayout-report #page-content #region-main-box #region-post-box #region-main-wrap #region-main { margin-left: 0px;}
          .pagelayout-report #page-content #region-main-box #region-post-box #region-pre { width: 0px;}
          .pagelayout-report #page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content table.generaltable {
               font-size:60%;
           }
      }
      
      Show
      A suggested workaround this problem is the following patch by my mentor Dietmar Wagner ******************************************** A patch for the report "Config changes": ******************************************** admin/report/configlog/index.php ======================== @@-12,1 +12,1@@ - admin_externalpage_setup('reportconfiglog'); + admin_externalpage_setup('reportconfiglog', '', null, '', array('pagelayout'=>'report')); With the following CSS added to theme/sky_high/style/pagelayout.css /* Report layout -------------------------*/ .pagelayout-report #page-content #region-main-box { margin-left: 0px;} .pagelayout-report #page-content #region-post-box { margin-left: -[[setting:regionwidth]];} .pagelayout-report #page-content #region-main { margin-left: [[setting:regionwidth]];} .pagelayout-report #page-content #region-pre { left: [[setting:regionwidth]]; width: [[setting:regionwidth]];} .pagelayout-report #page-content #region-post { width: 0%;} /* Print layout -------------------------*/ @media print { .pagelayout-report #page-content #region-main-box { margin-left: 0px;} .pagelayout-report #page-content #region-main-box #region-post-box { margin-left: 0px;} .pagelayout-report #page-content #region-main-box #region-post-box #region-main-wrap #region-main { margin-left: 0px;} .pagelayout-report #page-content #region-main-box #region-post-box #region-pre { width: 0px;} .pagelayout-report #page-content #region-main-box #region-post-box #region-main-wrap #region-main .region-content table.generaltable { font-size:60%; } }
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-29904-master
    • Rank:
      19437

      Description

      Printing something like quiz results is truncated when using Sky High as a theme. For example, a quiz with 21 attempts gives a print out of 8 attempts on the first two pages, and two blank pages. The same quiz printed using another theme prints the total number of attempts/results.

        Issue Links

          Activity

          Hide
          Mary Evans added a comment -

          @Tim Hunt

          Hi Tim, I have added you to this tracker issue for advice, as I don;t have any means of testing this with the amount of data needed to get a complete answer as to whether it is the theme or Moodle. I thought that you being the QUIZ Guru would be the best person to ask.

          Cheers
          Mary

          Show
          Mary Evans added a comment - @Tim Hunt Hi Tim, I have added you to this tracker issue for advice, as I don;t have any means of testing this with the amount of data needed to get a complete answer as to whether it is the theme or Moodle. I thought that you being the QUIZ Guru would be the best person to ask. Cheers Mary
          Hide
          Tim Hunt added a comment -

          No idea. It is just a big table, so I would guess that the gradebook would show similar issues too. I don't think it takes that long to generate a lot of attempts. Just make a quiz with one true/false question.

          Show
          Tim Hunt added a comment - No idea. It is just a big table, so I would guess that the gradebook would show similar issues too. I don't think it takes that long to generate a lot of attempts. Just make a quiz with one true/false question.
          Hide
          Mary Evans added a comment -

          Oh...I thought I would have to create loads different questions.
          I'll just use the three I have and duplicate them.
          Cheers

          Show
          Mary Evans added a comment - Oh...I thought I would have to create loads different questions. I'll just use the three I have and duplicate them. Cheers
          Hide
          Rob added a comment -

          I am adding that this is not just a problem with quiz results. I was asked to make a PDF of a student's activity logs, and get the same truncated output. I will post it to the discussion about this issue after I remove the student's identification. After I switched to Serenity, the pdf printed just fine.

          Show
          Rob added a comment - I am adding that this is not just a problem with quiz results. I was asked to make a PDF of a student's activity logs, and get the same truncated output. I will post it to the discussion about this issue after I remove the student's identification. After I switched to Serenity, the pdf printed just fine.
          Hide
          Mary Evans added a comment -

          Hi Rob,

          Since I don't have the facilities to test this out with the sort of data you are using, could you be so kind as to test this in both Overlay and Nonzero themes as these are the only other Blog style layouts in Moodle and should all produce the same results as you are finding with Sky High. If they work better, then we are closer to finding a fix for Sky High.
          Thanks
          Mary

          Show
          Mary Evans added a comment - Hi Rob, Since I don't have the facilities to test this out with the sort of data you are using, could you be so kind as to test this in both Overlay and Nonzero themes as these are the only other Blog style layouts in Moodle and should all produce the same results as you are finding with Sky High. If they work better, then we are closer to finding a fix for Sky High. Thanks Mary
          Hide
          Mary Evans added a comment - - edited

          Surprise! surprise! I managed to replicate this problem,,,and it not restricted to the one area, but rather as Tim says, it affects all reports. Like you say Rob, it truncates after the 8th/9th item and sends out blank pages! Very odd.
          Ill test this in the other 2 themes.
          Thanks
          Mary

          Show
          Mary Evans added a comment - - edited Surprise! surprise! I managed to replicate this problem,,,and it not restricted to the one area, but rather as Tim says, it affects all reports. Like you say Rob, it truncates after the 8th/9th item and sends out blank pages! Very odd. Ill test this in the other 2 themes. Thanks Mary
          Hide
          Mary Evans added a comment -

          @Julian Ridden - I have added you as a watcher to see if you can shed any light on what's happening here Julian!
          Cheers

          Show
          Mary Evans added a comment - @Julian Ridden - I have added you as a watcher to see if you can shed any light on what's happening here Julian! Cheers
          Hide
          Mary Evans added a comment -

          Hi Rob,
          I've just been testing this problem trying to find out why Sky High is so different. Can you do me a favour and test this using Binarius or Arialist as both of these themes have a separate report.php layout like Sky High, Serenity and quite a few other themes doesn't have a report layout. So this is possible the reason why you got a full report using Serenity and a truncated report using Sky High.

          Looking as the actual file itself, there are changes in the head part which is alian to me, so I need to get this checked out to see if it is causing the problem.

          At this point I am not sure how to resolve it...but there are enough Moodle developers who will know how to FIX this.

          Thanks

          Show
          Mary Evans added a comment - Hi Rob, I've just been testing this problem trying to find out why Sky High is so different. Can you do me a favour and test this using Binarius or Arialist as both of these themes have a separate report.php layout like Sky High, Serenity and quite a few other themes doesn't have a report layout. So this is possible the reason why you got a full report using Serenity and a truncated report using Sky High. Looking as the actual file itself, there are changes in the head part which is alian to me, so I need to get this checked out to see if it is causing the problem. At this point I am not sure how to resolve it...but there are enough Moodle developers who will know how to FIX this. Thanks
          Hide
          Rob added a comment -

          Thank you Mary for the time you are spending on this. Arialist and Binarius do not have the same problem. I was able to print quiz results just fine.

          Show
          Rob added a comment - Thank you Mary for the time you are spending on this. Arialist and Binarius do not have the same problem. I was able to print quiz results just fine.
          Hide
          Mary Evans added a comment - - edited

          Hi Rob, that's ODD as the report I ran off which I accessed via Settings > Site Administration > Reports > Config Changes printed the page missing off the right-hand side of the table. (using Arialist theme)

          So that I get this right...can you list (in a similar fashion to how I mapped how I got to the report I pinted off) the steps you took to produce the report you printed?

          Thanks
          Mary

          Show
          Mary Evans added a comment - - edited Hi Rob, that's ODD as the report I ran off which I accessed via Settings > Site Administration > Reports > Config Changes printed the page missing off the right-hand side of the table. (using Arialist theme) So that I get this right...can you list (in a similar fashion to how I mapped how I got to the report I pinted off) the steps you took to produce the report you printed? Thanks Mary
          Hide
          Rob added a comment -

          I did not try the config changes report for Arialist or Binarius. I PDF'ed quiz results in my test. I can confirm Arialist cuts off the right column in the config changes. This happens even if I dock all blocks. However, I do get all content to the bottom of the document. If I pring a user's activity logs, or quiz results, it is OK in Arialist. The issue with Sky High is that I get blank pages after 8 or so rows.

          I appreciate your efforts Mary. Thanks again.

          Show
          Rob added a comment - I did not try the config changes report for Arialist or Binarius. I PDF'ed quiz results in my test. I can confirm Arialist cuts off the right column in the config changes. This happens even if I dock all blocks. However, I do get all content to the bottom of the document. If I pring a user's activity logs, or quiz results, it is OK in Arialist. The issue with Sky High is that I get blank pages after 8 or so rows. I appreciate your efforts Mary. Thanks again.
          Hide
          Mary Evans added a comment -

          Ah...but HOW do you "...PDF quiz results...?
          That's what I need to know as I have never done it, infact I was not aware you could.

          Do I need a plugin?

          What are the actual CLICK actions to do this?

          This is VERY important as when we come to patch this we need to set the correct TESTING INSTRUCTIONS to reproduce the problem you encountered in the first place, for the tester to compare, before and after the patch is applied.

          Mary

          Show
          Mary Evans added a comment - Ah...but HOW do you "...PDF quiz results...? That's what I need to know as I have never done it, infact I was not aware you could. Do I need a plugin? What are the actual CLICK actions to do this? This is VERY important as when we come to patch this we need to set the correct TESTING INSTRUCTIONS to reproduce the problem you encountered in the first place, for the tester to compare, before and after the patch is applied. Mary
          Hide
          Rob added a comment -

          I use Adobe Acrobat (not the free Reader) and the open source PDF Creator.

          http://sourceforge.net/projects/pdfcreator/

          Both install a print driver, and show up as a printer in Windows. The process is the same as printing on paper. I go to the quiz results report (or config changes, etc.). I hit Ctrl+P, choose PDF creator as my printer, and the software creates a PDF. I have also tried printing the quiz results from my initial forum post on a laser printer at work. The output is the same, just the PDF is viewed on screen.

          Show
          Rob added a comment - I use Adobe Acrobat (not the free Reader) and the open source PDF Creator. http://sourceforge.net/projects/pdfcreator/ Both install a print driver, and show up as a printer in Windows. The process is the same as printing on paper. I go to the quiz results report (or config changes, etc.). I hit Ctrl+P, choose PDF creator as my printer, and the software creates a PDF. I have also tried printing the quiz results from my initial forum post on a laser printer at work. The output is the same, just the PDF is viewed on screen.
          Hide
          Mary Evans added a comment -

          Thanks for this info Rob...much appreciated.
          So the place you called the Report from is in the same place as all the other Reports then, in Site Administration > Reports?

          That's even more interesting as these don't seem to use the repart.php layout that they are supposed to use. How very interesting!

          Oh well I think I am getting nearer.

          Show
          Mary Evans added a comment - Thanks for this info Rob...much appreciated. So the place you called the Report from is in the same place as all the other Reports then, in Site Administration > Reports? That's even more interesting as these don't seem to use the repart.php layout that they are supposed to use. How very interesting! Oh well I think I am getting nearer.
          Hide
          Rob added a comment -

          To clarify, I am pulling reports from courses too. The output is the same.

          Show
          Rob added a comment - To clarify, I am pulling reports from courses too. The output is the same.
          Hide
          Mary Evans added a comment -

          Hi,
          I think I have caught the little critter!

          There seems to be a BUG in the way the layouts are defined in the theme's config.php.
          It would appear that report.php (where defined in a theme) is not being used for the majority of the reports I tested.

          What perhaps is even more interesting, is that the options, as defined for the print layout in config.php, are not being read.

              // Should display the content and basic headers only.
              'print' => array(
                  'file' => 'general.php',
                  'regions' => array(),
                  'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true),
              ),
          

          As can be see with in the above example taken from theme/sky_high/config.php, the fact that it states NO FOOTER and NO BLOCKS it prints the report with blocks and footer. See attached PDF.

          Seems a bigger problem than I first thought.

          Perhaps one Tim might understand what's going on better than me as I'm absolutely clueless which it come to finding a FIX for this sort of thing!

          I have already tried adding defining embedded.php as a possible layout for printing. I have added a print.css to base theme to see if that made any difference. I purged the cache just to make sure...but made no one jot of a differnce.

          Not sure how this will pan out Rob...but we are getting ever closer.

          Cheers
          Mary

          Show
          Mary Evans added a comment - Hi, I think I have caught the little critter! There seems to be a BUG in the way the layouts are defined in the theme's config.php. It would appear that report.php (where defined in a theme) is not being used for the majority of the reports I tested. What perhaps is even more interesting, is that the options, as defined for the print layout in config.php, are not being read. // Should display the content and basic headers only. 'print' => array( 'file' => 'general.php', 'regions' => array(), 'options' => array('nofooter'=>true, 'nonavbar'=>false, 'noblocks'=>true), ), As can be see with in the above example taken from theme/sky_high/config.php, the fact that it states NO FOOTER and NO BLOCKS it prints the report with blocks and footer. See attached PDF. Seems a bigger problem than I first thought. Perhaps one Tim might understand what's going on better than me as I'm absolutely clueless which it come to finding a FIX for this sort of thing! I have already tried adding defining embedded.php as a possible layout for printing. I have added a print.css to base theme to see if that made any difference. I purged the cache just to make sure...but made no one jot of a differnce. Not sure how this will pan out Rob...but we are getting ever closer. Cheers Mary
          Hide
          Mary Evans added a comment -

          This is a PDF of the report I rand off from Site Administration > Reports > Config Changes using Sky High theme. Notice the side blocks are visible. Although there is No footer, but there is hardly any of the main body of the report either!

          I'm surprised that this has not come to light before now!

          Show
          Mary Evans added a comment - This is a PDF of the report I rand off from Site Administration > Reports > Config Changes using Sky High theme. Notice the side blocks are visible. Although there is No footer, but there is hardly any of the main body of the report either! I'm surprised that this has not come to light before now!
          Hide
          Tim Hunt added a comment -

          I think your faith in my understanding is misplaced

          I think we really need Sam Hemelryk to take a look at this, when he gets a moment.

          Show
          Tim Hunt added a comment - I think your faith in my understanding is misplaced I think we really need Sam Hemelryk to take a look at this, when he gets a moment.
          Hide
          Mary Evans added a comment -

          @Sam Hemelryk -

          Hi Sam I have just added you as a watcher as I think we could do with your expertise to help solve this problem.
          Thanks
          Mary

          Show
          Mary Evans added a comment - @Sam Hemelryk - Hi Sam I have just added you as a watcher as I think we could do with your expertise to help solve this problem. Thanks Mary
          Hide
          Mary Evans added a comment -

          @Rajesh

          I have just added a patch which works for "Config Changes Report" page using Sky High.

          Cheers
          Mary

          Show
          Mary Evans added a comment - @Rajesh I have just added a patch which works for "Config Changes Report" page using Sky High. Cheers Mary
          Hide
          Dietmar Wagner added a comment -

          Hi Mary,
          I tested your workaround but - I'm sorry to say it - I can't get sky_high work as it should.
          We have two improvements until now:

          • report "Config changes" has the body class .pagelayout-report
          • the table is not truncated at the right side when we print the report (print version is .content-only)
            But still only a few items of the table are printed on my system with sky_high (and nonzero). Rob, could you please test the workaround on your systems!?

          In the meanwhile I will test and dig again:

          • Should we use the (unused) layout report.php?
          • Is there something wrong with the extra content wrapper?
          • What's about the "post-footer"?
          • Should we change the report layout to a r4eal side-pre - content - layout?

          Will be back!
          Dietmar

          Show
          Dietmar Wagner added a comment - Hi Mary, I tested your workaround but - I'm sorry to say it - I can't get sky_high work as it should. We have two improvements until now: report "Config changes" has the body class .pagelayout-report the table is not truncated at the right side when we print the report (print version is .content-only) But still only a few items of the table are printed on my system with sky_high (and nonzero). Rob, could you please test the workaround on your systems!? In the meanwhile I will test and dig again: Should we use the (unused) layout report.php? Is there something wrong with the extra content wrapper? What's about the "post-footer"? Should we change the report layout to a r4eal side-pre - content - layout? Will be back! Dietmar
          Hide
          Mary Evans added a comment -

          Hi,
          I forgot that I had changed the page-footer. It was written in a strange way so rewrote it as follows...

          <!-- END OF FOOTER -->

          I changed this...

          <!-- START OF FOOTER -->
          
              <div id="page-footer">
          		<div class="footnote"><?php echo $footnote; ?></div>
                  <?php
                  echo $OUTPUT->login_info();
                  echo $OUTPUT->standard_footer_html();
                  ?>
              </div>
          
          <!-- END OF FOOTER -->
          </div>
          </div>
          	<p class="helplink">
                  <?php echo page_doc_link(get_string('moodledocslink')) ?>
              </p><center>
                  <?php
          	echo $OUTPUT->home_link();
          	echo $OUTPUT->standard_end_of_body_html() ?>
          </center>
          </body>
          </html>
          
          

          to this...

          <!-- START OF FOOTER -->
          
              <div id="page-footer">
          		<div class="footnote"><?php echo $footnote; ?></div>
                  <?php
                  echo $OUTPUT->login_info();
                  ?>
              </div>
          
          <!-- END OF FOOTER -->
          </div>
          </div>
              <p class="helplink">
                  <?php echo page_doc_link(get_string('moodledocslink')) ?>
              </p>
              <center><?php
              echo $OUTPUT->home_link();
              echo $OUTPUT->standard_footer_html(); ?>
              </center>
          <?php echo $OUTPUT->standard_end_of_body_html() ?>
          </body>
          </html>
          

          I don't much like the use of center tag but it's not doing any harm so I left it but if I was to do this fix I would rewrite that and create a rule in the CSS

          Notice I brought the output for standard footer to the very end of the page, this allows the 'performance info' to print in the footer, which it refused to do before this change.

          But whether this has something to do with the printing, I don;t know...I need to re-test.

          Sorry about that Deitmar.

          I'll reset the code and add the patch and see where I get.

          Cheers
          Mary

          Show
          Mary Evans added a comment - Hi, I forgot that I had changed the page-footer. It was written in a strange way so rewrote it as follows... <!-- END OF FOOTER --> I changed this... <!-- START OF FOOTER --> <div id="page-footer"> <div class="footnote"><?php echo $footnote; ?></div> <?php echo $OUTPUT->login_info(); echo $OUTPUT->standard_footer_html(); ?> </div> <!-- END OF FOOTER --> </div> </div> <p class="helplink"> <?php echo page_doc_link(get_string('moodledocslink')) ?> </p><center> <?php echo $OUTPUT->home_link(); echo $OUTPUT->standard_end_of_body_html() ?> </center> </body> </html> to this... <!-- START OF FOOTER --> <div id="page-footer"> <div class="footnote"><?php echo $footnote; ?></div> <?php echo $OUTPUT->login_info(); ?> </div> <!-- END OF FOOTER --> </div> </div> <p class="helplink"> <?php echo page_doc_link(get_string('moodledocslink')) ?> </p> <center><?php echo $OUTPUT->home_link(); echo $OUTPUT->standard_footer_html(); ?> </center> <?php echo $OUTPUT->standard_end_of_body_html() ?> </body> </html> I don't much like the use of center tag but it's not doing any harm so I left it but if I was to do this fix I would rewrite that and create a rule in the CSS Notice I brought the output for standard footer to the very end of the page, this allows the 'performance info' to print in the footer, which it refused to do before this change. But whether this has something to do with the printing, I don;t know...I need to re-test. Sorry about that Deitmar. I'll reset the code and add the patch and see where I get. Cheers Mary
          Hide
          Mary Evans added a comment -

          Hi Dietmar,

          I can verify the patch works regardless of the changes made to the footer.

          Cheers
          Mary

          Show
          Mary Evans added a comment - Hi Dietmar, I can verify the patch works regardless of the changes made to the footer. Cheers Mary
          Hide
          Dietmar Wagner added a comment -

          Hi Mary,
          it's somehow frustrating.
          I updated to a newer Moodle version(now: 2.1.2+ BUILD (20111010)] in order to have a clean installation, applied the patches to admin/report/backups/index.php and admin/report/configlog/index.php (body class .pagelayout-report is ok), added the CSS for .pagelayout-report and later altered the general.php footer.
          And can't get it working, more precisely FF 8 , IE 8 , Chrome 15 (+ yes!), Opera 11 .
          In the printed version of the backup report only 20 of 47 existing courses are shown.
          No idea! Your Moodle version?
          Cheers
          Dietmar

          Show
          Dietmar Wagner added a comment - Hi Mary, it's somehow frustrating. I updated to a newer Moodle version(now: 2.1.2+ BUILD (20111010)] in order to have a clean installation, applied the patches to admin/report/backups/index.php and admin/report/configlog/index.php (body class .pagelayout-report is ok), added the CSS for .pagelayout-report and later altered the general.php footer. And can't get it working, more precisely FF 8 , IE 8 , Chrome 15 (+ yes!), Opera 11 . In the printed version of the backup report only 20 of 47 existing courses are shown. No idea! Your Moodle version? Cheers Dietmar
          Hide
          Mary Evans added a comment -

          Hi,
          My Moodle version is 2.0.5 (20111102 CVS) with FF8 and IE9 (although I did not check it in IE)

          I have just tested this in Moodle 2.1.2 (20111102 CVS) with FF8 & Chrome 15 (more print options) and works fine but only prints the data of the page displayed on screen.

          What you are getting is probably the same as I am except I was only looking at the number of items on the page which, in earlier (pre patch test) only ran off 8 lines and overlayed with the sidebar as well. But with the patch I am getting the whole page of data.

          So the problem we are looking at now is how to print off the whole of the data in "any" report, as opposed to one page at a time manually!

          Mary

          Show
          Mary Evans added a comment - Hi, My Moodle version is 2.0.5 (20111102 CVS) with FF8 and IE9 (although I did not check it in IE) I have just tested this in Moodle 2.1.2 (20111102 CVS) with FF8 & Chrome 15 (more print options) and works fine but only prints the data of the page displayed on screen. What you are getting is probably the same as I am except I was only looking at the number of items on the page which, in earlier (pre patch test) only ran off 8 lines and overlayed with the sidebar as well. But with the patch I am getting the whole page of data. So the problem we are looking at now is how to print off the whole of the data in "any" report, as opposed to one page at a time manually! Mary
          Hide
          Dietmar Wagner added a comment -

          Hi Mary,

          thanks for your comment. Did I understand you correctly that your printed version of the report Config changes includes the whole table regardless of how many rows the table has? Hmmmm!?

          I poked around a little bit in this matter and I hope I made a step foreward - for my system!

          My starting point: The small patch for admin/report/configlog/index.php.

          I) I tried to print report Config changes with Arialist: 30 of 30 items! (=> attachment )

          II) I did the same with Sky_high and your CSS workaround: 11 of 30 items! (=> attachment)

          III) After

          • changing in sky_high/config.php (I don't use sky_high's own report.php!)

          'report' => array(
          'file' => 'general.php',
          'regions' => array('side-pre'),
          'defaultregion' => 'side-pre',
          )

          to

          'report' => array(
          'theme' => 'base', // !!!!!
          'file' => 'report.php',
          'regions' => array('side-pre'),
          'defaultregion' => 'side-pre',
          )

          and

          • replacing your CSS workaround for Sky_high with the rules for .pagelayout-report in Base (without any media print CSS)

          printing reports with the pdfcreator works absolutely fine: 30 of 30 items (=> attachment)

          Now, what does that mean in connection to your comment?
          I think it means that I/we have neither a Moodle version issue nor a browser issue.
          In my opinion the culprit is hiding in the pagelayout of Sky_high general.php.

          Back to the digging tools!

          Cheers
          Dietmar

          Show
          Dietmar Wagner added a comment - Hi Mary, thanks for your comment. Did I understand you correctly that your printed version of the report Config changes includes the whole table regardless of how many rows the table has? Hmmmm!? I poked around a little bit in this matter and I hope I made a step foreward - for my system! My starting point: The small patch for admin/report/configlog/index.php. I) I tried to print report Config changes with Arialist: 30 of 30 items! (=> attachment ) II) I did the same with Sky_high and your CSS workaround: 11 of 30 items! (=> attachment) III) After changing in sky_high/config.php (I don't use sky_high's own report.php!) 'report' => array( 'file' => 'general.php', 'regions' => array('side-pre'), 'defaultregion' => 'side-pre', ) to 'report' => array( 'theme' => 'base', // !!!!! 'file' => 'report.php', 'regions' => array('side-pre'), 'defaultregion' => 'side-pre', ) and replacing your CSS workaround for Sky_high with the rules for .pagelayout-report in Base (without any media print CSS) printing reports with the pdfcreator works absolutely fine: 30 of 30 items (=> attachment) Now, what does that mean in connection to your comment? I think it means that I/we have neither a Moodle version issue nor a browser issue. In my opinion the culprit is hiding in the pagelayout of Sky_high general.php. Back to the digging tools! Cheers Dietmar
          Hide
          Mary Evans added a comment -

          Hi Dietmar,

          I think you are correct in your assumption.
          I am busy re-basing some Moodle commits, for other issues in the pipeline, so I wont be able to look at Sky-High unlil later.

          Thanks again for your help in solving this problem.

          Cheers
          Mary

          Show
          Mary Evans added a comment - Hi Dietmar, I think you are correct in your assumption. I am busy re-basing some Moodle commits, for other issues in the pipeline, so I wont be able to look at Sky-High unlil later. Thanks again for your help in solving this problem. Cheers Mary
          Hide
          Dietmar Wagner added a comment - - edited

          Take your time, Mary!

          Show
          Dietmar Wagner added a comment - - edited Take your time, Mary!
          Hide
          Dietmar Wagner added a comment -

          Hi Mary,

          I succeded in attributing the body class .pagelayout-report to all reports that are available in the settings block.
          Here my proposals for the required patches:

          *************************************
          Reports "Comments" is ok
          *************************************

          *************************************
          A patch for the report "Backups":
          *************************************
          admin/report/backups/index.php
          ========================
          @@-10,1 +10,1@@

          • admin_externalpage_setup('reportbackups');
            + admin_externalpage_setup('reportbackups', '', null, '', array('pagelayout'=>'report'));

          ********************************************
          A patch for the report "Config changes":
          ********************************************
          admin/report/configlog/index.php
          ========================
          @@-12,1 +12,1@@

          • admin_externalpage_setup('reportconfiglog');
            + admin_externalpage_setup('reportconfiglog', '', null, '', array('pagelayout'=>'report'));

          ********************************************
          A patch for the report "Course overview":
          ********************************************
          admin/report/configlog/index.php
          ========================
          @@-19,1 +19,1@@

          • admin_externalpage_setup('reportcourseoverview');
            + admin_externalpage_setup('reportcourseoverview', '', null, '', array('pagelayout'=>'report'));

          ********************************************
          A patch for the report "Logs":
          ********************************************
          course/report/log/index.php
          ========================
          @@-98,1 +98,1@@

          • admin_externalpage_setup('reportlog');
            + admin_externalpage_setup('reportlog', '', null, '', array('pagelayout'=>'report'));

          ********************************************
          A patch for the report "Live logs":
          ********************************************
          course/report/log/indexlive.php
          ========================
          @@-24,1 +24,1@@

          • admin_externalpage_setup('reportloglive');
            + admin_externalpage_setup('reportloglive', '', null, '', array('pagelayout'=>'report'));

          ********************************************
          A patch for the report "Question instances":
          ********************************************
          admin/report/questioninstances/index.php
          ========================
          @@-18,1 +18,1@@

          • admin_externalpage_setup('reportquestioninstances');
            + admin_externalpage_setup('reportquestioninstances', '', null, '', array('pagelayout'=>'report'));

          ********************************************
          A patch for the report "Security overview":
          ********************************************
          admin/report/security/index.php
          ========================
          @@-48,1 +48,1@@

          • admin_externalpage_setup('reportsecurity');
            + admin_externalpage_setup('reportsecurity', '', null, '', array('pagelayout'=>'report'));

          ********************************************
          A patch for the report "Spam cleaner":
          ********************************************
          admin/report/spamcleaner/index.php
          ========================
          @@-43,1 +43,1@@

          • admin_externalpage_setup('reportspamcleaner');
            + admin_externalpage_setup('reportspamcleaner', '', null, '', array('pagelayout'=>'report'));

          ********************************************
          A patch for the report "Statistics":
          ********************************************
          course/report/stats/index.php
          ========================
          @@-52,1 +52,1@@

          • admin_externalpage_setup('reportstats');
            + admin_externalpage_setup('reportstats', '', null, '', array('pagelayout'=>'report'));

          I'm still engaged with sky_high report.php. I hope the weekend will bring the breakthrough. We will see!

          Cheers
          Dietmar

          @Sam: The patches work fine, but I don't know if it's best way to get there!?

          Show
          Dietmar Wagner added a comment - Hi Mary, I succeded in attributing the body class .pagelayout-report to all reports that are available in the settings block. Here my proposals for the required patches: ************************************* Reports "Comments" is ok ************************************* ************************************* A patch for the report "Backups": ************************************* admin/report/backups/index.php ======================== @@-10,1 +10,1@@ admin_externalpage_setup('reportbackups'); + admin_externalpage_setup('reportbackups', '', null, '', array('pagelayout'=>'report')); ******************************************** A patch for the report "Config changes": ******************************************** admin/report/configlog/index.php ======================== @@-12,1 +12,1@@ admin_externalpage_setup('reportconfiglog'); + admin_externalpage_setup('reportconfiglog', '', null, '', array('pagelayout'=>'report')); ******************************************** A patch for the report "Course overview": ******************************************** admin/report/configlog/index.php ======================== @@-19,1 +19,1@@ admin_externalpage_setup('reportcourseoverview'); + admin_externalpage_setup('reportcourseoverview', '', null, '', array('pagelayout'=>'report')); ******************************************** A patch for the report "Logs": ******************************************** course/report/log/index.php ======================== @@-98,1 +98,1@@ admin_externalpage_setup('reportlog'); + admin_externalpage_setup('reportlog', '', null, '', array('pagelayout'=>'report')); ******************************************** A patch for the report "Live logs": ******************************************** course/report/log/indexlive.php ======================== @@-24,1 +24,1@@ admin_externalpage_setup('reportloglive'); + admin_externalpage_setup('reportloglive', '', null, '', array('pagelayout'=>'report')); ******************************************** A patch for the report "Question instances": ******************************************** admin/report/questioninstances/index.php ======================== @@-18,1 +18,1@@ admin_externalpage_setup('reportquestioninstances'); + admin_externalpage_setup('reportquestioninstances', '', null, '', array('pagelayout'=>'report')); ******************************************** A patch for the report "Security overview": ******************************************** admin/report/security/index.php ======================== @@-48,1 +48,1@@ admin_externalpage_setup('reportsecurity'); + admin_externalpage_setup('reportsecurity', '', null, '', array('pagelayout'=>'report')); ******************************************** A patch for the report "Spam cleaner": ******************************************** admin/report/spamcleaner/index.php ======================== @@-43,1 +43,1@@ admin_externalpage_setup('reportspamcleaner'); + admin_externalpage_setup('reportspamcleaner', '', null, '', array('pagelayout'=>'report')); ******************************************** A patch for the report "Statistics": ******************************************** course/report/stats/index.php ======================== @@-52,1 +52,1@@ admin_externalpage_setup('reportstats'); + admin_externalpage_setup('reportstats', '', null, '', array('pagelayout'=>'report')); I'm still engaged with sky_high report.php. I hope the weekend will bring the breakthrough. We will see! Cheers Dietmar @Sam: The patches work fine, but I don't know if it's best way to get there!?
          Hide
          Rob added a comment -

          Hi Dietmar,

          Thank you for the time and effort you are putting in to solve this. I notice your proposed patches are all for site reports. Would course level reports be fixed by these as well? It was printing quiz results that this was first noticed by my teachers. They are often asked to bring print-outs of common assessment data to meetings where they may not have access to a computer.

          Rob

          Show
          Rob added a comment - Hi Dietmar, Thank you for the time and effort you are putting in to solve this. I notice your proposed patches are all for site reports. Would course level reports be fixed by these as well? It was printing quiz results that this was first noticed by my teachers. They are often asked to bring print-outs of common assessment data to meetings where they may not have access to a computer. Rob
          Hide
          Dietmar Wagner added a comment - - edited

          Hi Rob,
          the quiz results seem to have the body class without applying the patches above!
          Try to print the quiz results [with another theme] until we have fixed MDL-29904!

          Dietmar

          Show
          Dietmar Wagner added a comment - - edited Hi Rob, the quiz results seem to have the body class without applying the patches above! Try to print the quiz results [with another theme] until we have fixed MDL-29904 ! Dietmar
          Hide
          Mary Evans added a comment -

          @Dietmar

          Thanks for adding these, I'll get them done ASAP that's if Rajesh has no objections.
          I'd also like you help with another page layout problem in anothet tracker issue. I'll add you as a watcher to it then you can see the problem.

          Cheers
          Mary

          Show
          Mary Evans added a comment - @Dietmar Thanks for adding these, I'll get them done ASAP that's if Rajesh has no objections. I'd also like you help with another page layout problem in anothet tracker issue. I'll add you as a watcher to it then you can see the problem. Cheers Mary
          Hide
          Dietmar Wagner added a comment -

          @Mary: I will like it!

          Show
          Dietmar Wagner added a comment - @Mary: I will like it!
          Hide
          Mary Evans added a comment - - edited

          Hi Dietmar,
          As you will see above I added the fixes, and set 'workflow' to 'Waiting for integration review'.

          However, while I was doing the fixes, I found that of the 9 you mentioned only 8 were present in Moodle 2.2, and only 6 in both Moodle 2.1 & 2.0.

          Spamcleaner was missing from Moodle 2.2, and Loglive from Moodle 2.1 & 2.0.

          I also found that Log and Stats were already coded in Moodle 2.1 & 2.0 but in settings.php. You can check this out here...

          https://github.com/lazydaisy/moodle/blob/MOODLE_21_STABLE/admin/report/log/settings.php

          I presume this is OK?

          Cheers
          Mary

          Show
          Mary Evans added a comment - - edited Hi Dietmar, As you will see above I added the fixes, and set 'workflow' to 'Waiting for integration review'. However, while I was doing the fixes, I found that of the 9 you mentioned only 8 were present in Moodle 2.2, and only 6 in both Moodle 2.1 & 2.0. Spamcleaner was missing from Moodle 2.2, and Loglive from Moodle 2.1 & 2.0. I also found that Log and Stats were already coded in Moodle 2.1 & 2.0 but in settings.php. You can check this out here... https://github.com/lazydaisy/moodle/blob/MOODLE_21_STABLE/admin/report/log/settings.php I presume this is OK? Cheers Mary
          Hide
          Dietmar Wagner added a comment -

          Hi Mary,

          that's one small step for ...

          1) I'm only using Moodle 2.1 (and 1.9 as fallback) in the moment and can't say anything to other moodle versions.

          My report menu shows the following items:

          Comments
          Backups
          Config changes
          Course overview
          Logs
          Live logs
          Question instances
          Security overview
          Spam cleaner
          Statistics
          !?
          (May be the number of reports depends on specific admin settings.)

          2) The code in admin/report/logs/settings.php and admin/report/statistics/settings.php does not add the body class .pagelayout-report to the reports "Logs", "Live logs" and "Statistics". I tested it just this moment. So it would have made sense to integrate the 3 course level patches too. MDL-29904 is fixed anyway.

          Cheers
          Dietmar

          Show
          Dietmar Wagner added a comment - Hi Mary, that's one small step for ... 1) I'm only using Moodle 2.1 (and 1.9 as fallback) in the moment and can't say anything to other moodle versions. My report menu shows the following items: Comments Backups Config changes Course overview Logs Live logs Question instances Security overview Spam cleaner Statistics !? (May be the number of reports depends on specific admin settings.) 2) The code in admin/report/logs/settings.php and admin/report/statistics/settings.php does not add the body class .pagelayout-report to the reports "Logs", "Live logs" and "Statistics". I tested it just this moment. So it would have made sense to integrate the 3 course level patches too. MDL-29904 is fixed anyway. Cheers Dietmar
          Hide
          Mary Evans added a comment - - edited

          There were quite a few more reports in Moodle 2.2 which had index.php but not on your list. I was tempted to add the report layout to them, but didn't as I was not sure if I was doing the correct thing.

          You can see what I mean here...

          https://github.com/lazydaisy/moodle/blob/master/report/

          And if you check line 45 in this page...

          https://github.com/lazydaisy/moodle/blob/master/report/participation/index.php

          you will see this setting...

          $PAGE->set_pagelayout('admin');
          

          which is why the report pages are not actually using the report layout page...which is interesting in itself!

          What do you think?
          Mary

          Show
          Mary Evans added a comment - - edited There were quite a few more reports in Moodle 2.2 which had index.php but not on your list. I was tempted to add the report layout to them, but didn't as I was not sure if I was doing the correct thing. You can see what I mean here... https://github.com/lazydaisy/moodle/blob/master/report/ And if you check line 45 in this page... https://github.com/lazydaisy/moodle/blob/master/report/participation/index.php you will see this setting... $PAGE->set_pagelayout('admin'); which is why the report pages are not actually using the report layout page...which is interesting in itself! What do you think? Mary
          Hide
          Mary Evans added a comment - - edited

          Following on from my last comment...
          https://github.com/lazydaisy/moodle/blob/master/report/questioninstances/settings.php

          This shows the settings.php from questioninstances...where it lists the following...

          $ADMIN->add('reports', new admin_externalpage('reportquestioninstances', get_string('pluginname', 'report_questioninstances'), "$CFG->wwwroot/report/questioninstances/index.php", 'report/questioninstances:view'));
          

          I am wondering now if what I added in the index will affect these settings?


          M

          Show
          Mary Evans added a comment - - edited Following on from my last comment... https://github.com/lazydaisy/moodle/blob/master/report/questioninstances/settings.php This shows the settings.php from questioninstances...where it lists the following... $ADMIN->add('reports', new admin_externalpage('reportquestioninstances', get_string('pluginname', 'report_questioninstances'), "$CFG->wwwroot/report/questioninstances/index.php", 'report/questioninstances:view')); I am wondering now if what I added in the index will affect these settings? M
          Hide
          Dietmar Wagner added a comment -

          Hmmmm!? I see!
          You've got me stumped, Mary!
          I think that's the point where we really need the core developers out there!

          Cheers
          Dietmar

          Show
          Dietmar Wagner added a comment - Hmmmm!? I see! You've got me stumped, Mary! I think that's the point where we really need the core developers out there! Cheers Dietmar
          Hide
          Dietmar Wagner added a comment -

          Hi Mary,
          @questioninstances: I'm sure that after applying the corresponding patch the body class .pagelayout-report is attributed to the report "Questioninstances". And that is what we wanted to achieve, isn't it?

          Cheers
          Dietmar

          Show
          Dietmar Wagner added a comment - Hi Mary, @questioninstances: I'm sure that after applying the corresponding patch the body class .pagelayout-report is attributed to the report "Questioninstances". And that is what we wanted to achieve, isn't it? Cheers Dietmar
          Hide
          Mary Evans added a comment -

          Well...when they get around to testing this...we shall find out! LOL
          And probably learn something new in the process!

          Thanks
          Mary

          Show
          Mary Evans added a comment - Well...when they get around to testing this...we shall find out! LOL And probably learn something new in the process! Thanks Mary
          Hide
          Sam Hemelryk added a comment -

          Thanks guys - this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks guys - this has been integrated now
          Hide
          Aparup Banerjee added a comment -

          thanks this works for me....

          Show
          Aparup Banerjee added a comment - thanks this works for me....
          Hide
          Mary Evans added a comment -

          Excellent! Thanks

          Show
          Mary Evans added a comment - Excellent! Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          And this has landed upstream, just on time for the upcoming new releases week. Thanks for it!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - And this has landed upstream, just on time for the upcoming new releases week. Thanks for it! Ciao
          Hide
          Rob added a comment -

          Hi all,

          Thanks to everyone for the hard work put into fixing this issue. I just updated my production site to the latest 2.1.2+ thinking the fixes were included. The integration is listed in recent changes. However, I am still getting truncated print jobs using Sky High (quiz results and config changes). Have the fixes not been included yet? Should I wait until next week?

          Rob

          Show
          Rob added a comment - Hi all, Thanks to everyone for the hard work put into fixing this issue. I just updated my production site to the latest 2.1.2+ thinking the fixes were included. The integration is listed in recent changes. However, I am still getting truncated print jobs using Sky High (quiz results and config changes). Have the fixes not been included yet? Should I wait until next week? Rob
          Hide
          Mary Evans added a comment -

          Hi Rob,
          Yes it is in the current download for 2.1.2+, however, you may be in a situation where your current site's cache needs purging.

          To do this go to Settings > Site Administration > Development > Purge all caches Clicking this link takes you to a page where there is a button to click which actives the process it takes a little while to clear the cache. Once this is done, you can return to the report page and refresh your browser in the normal way or try clicking the Ctrl + F5 keys together as this forces a complete refresh of the page.

          You can then try the printing process again.

          Let me know how you get on.
          Thanks
          Mary

          Show
          Mary Evans added a comment - Hi Rob, Yes it is in the current download for 2.1.2+, however, you may be in a situation where your current site's cache needs purging. To do this go to Settings > Site Administration > Development > Purge all caches Clicking this link takes you to a page where there is a button to click which actives the process it takes a little while to clear the cache. Once this is done, you can return to the report page and refresh your browser in the normal way or try clicking the Ctrl + F5 keys together as this forces a complete refresh of the page. You can then try the printing process again. Let me know how you get on. Thanks Mary
          Hide
          Rob added a comment -

          Hi Mary,

          I cleared the server cache and my browser. I also upgraded my test site and do not see the fix. Just to be clarify, I upgraded to Moodle 2.1.2+ (Build: 20111125). I will try a fresh download/install today after I get into the office.

          Rob

          Show
          Rob added a comment - Hi Mary, I cleared the server cache and my browser. I also upgraded my test site and do not see the fix. Just to be clarify, I upgraded to Moodle 2.1.2+ (Build: 20111125). I will try a fresh download/install today after I get into the office. Rob
          Hide
          Mary Evans added a comment -

          I would not do anything more, Rob as this is now a theme issue, and nothing to do with the patches which have just been applied.

          I'm going to create a sub-task to deal with this issue.

          Thanks for your patience.
          Mary

          Show
          Mary Evans added a comment - I would not do anything more, Rob as this is now a theme issue, and nothing to do with the patches which have just been applied. I'm going to create a sub-task to deal with this issue. Thanks for your patience. Mary
          Hide
          Dietmar Wagner added a comment -

          Hi Rob, hi Mary,

          I made an update to the latest version of 2.1.2+ thisafternoon.
          The patches for atttributing the right body class to the reports are integrated.
          But the workaround for sky-high itself (footer, CSS for .pagelayout-report and @ media print)is missing for some reason.

          Cheers
          Dietmar

          Show
          Dietmar Wagner added a comment - Hi Rob, hi Mary, I made an update to the latest version of 2.1.2+ thisafternoon. The patches for atttributing the right body class to the reports are integrated. But the workaround for sky-high itself (footer, CSS for .pagelayout-report and @ media print)is missing for some reason. Cheers Dietmar
          Hide
          Rob added a comment -

          Hi Mary and Dietmar,

          You two are great. Thank you for getting back to me so quickly.

          Mary, will the sub-task be part of this tracker issue? If not, will you please link to it here so I can add myself as a watcher?

          Rob

          Show
          Rob added a comment - Hi Mary and Dietmar, You two are great. Thank you for getting back to me so quickly. Mary, will the sub-task be part of this tracker issue? If not, will you please link to it here so I can add myself as a watcher? Rob
          Hide
          Mary Evans added a comment -

          Hi Rob,

          The new tracker issue is MDL-30500 It's a sub-task of MDL-30238

          Cheers
          Mary

          Show
          Mary Evans added a comment - Hi Rob, The new tracker issue is MDL-30500 It's a sub-task of MDL-30238 Cheers Mary
          Hide
          Mary Evans added a comment - - edited

          @Dietmar

          That's because I left them off to see if the patch worked without them. Apparently it does for some reports, but not for others as Rob is still finding out.

          I can concentrate better now on Sky High in MDL-30500 and see if we can find any more issues related to the layout for this theme.

          Thanks
          Mary

          Show
          Mary Evans added a comment - - edited @Dietmar That's because I left them off to see if the patch worked without them. Apparently it does for some reports, but not for others as Rob is still finding out. I can concentrate better now on Sky High in MDL-30500 and see if we can find any more issues related to the layout for this theme. Thanks Mary
          Hide
          Dietmar Wagner added a comment -

          This makes a lot of sense, Mary!

          Dietmar

          Show
          Dietmar Wagner added a comment - This makes a lot of sense, Mary! Dietmar

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: