Improved Printing of Gradebook User Reports

Improved Printing of Gradebook User Reports

Brian Pooldən -
Number of replies: 16

My teaching staff would like to be able to print a "clean" user report of grades for using during teacher conferences.  Does anyone have a modification that would clean up the printing of the user reports?

We would like it to skip the Moodle Header information, side blocks (which we dock anyway) and look similar to how it looks on the webpage.

We can skip the first and last pages (but would like not to) on printing, but we get the teacher's picture on the printout and no student name, making it unusable.  If we try a group, you get the student names, but they are across the site name and barely readable. I would suggest this become a core Moodle change so that schools have a way to easily printout user grades.

  Brian Pool

Attachment Desktop screenshot (3).png
Attachment Desktop screenshot (5).png
Orta qiymət: -
In reply to Brian Pool

Re: Improved Printing of Gradebook User Reports

Rick Jerzdən -
Particularly helpful Moodlers istifadəçinin şəkili Testers istifadəçinin şəkili

Interesting request, Brian.

In my 10 years of using Moodle, I have never wanted to do this.  There have been times when an administrator has asked me about a student's overall grade, and I simply print the grade book User Report to a PDF file.  This works, but it does include some "garbage" at the top, but not a problem.

Your request does take on a similarity to people who as for printed versions of a Moodle quiz.

One response is "we are an electronic product, and not a printed product" meaning Moodle.  If you want paper, go back to paper systems.  However, there is always room for improvement.

For the Grader Report, one can export the grade book, bring the exported data into a spreadsheet product, and make it as pretty as they want.  But there is no "export" feature for the User report.  There have been a few times where I want to play around with a user's grade book view, and I have been successful copy/pasting the User report into Excel.  Yep, some clean up required.

Well, might we just need a method to "Export" the User Report?  I don't know, I am just thinking out loud.  I do appreciate that you raised the question.

In reply to Rick Jerz

Re: Improved Printing of Gradebook User Reports

Brian Pooldən -

I completely understand your point on being online, but that is really only a good point when talking about users that always have access and college students.  In a K-12 rural environment we have lots of users that may not have access.  Additionally, when staff do parent/teacher conferences, parents want to see and go over the grades and what their students can improve.  We need a clean way to print their grades to review and send home with involved parents. 

As a tech director I can certainly export to excel and  print (although that is alot of work for 100+ students.)  That is not however the way I want all my staff to do it, as they can't all do that.  gülürəm

It just seems it should be a cleaner product straight out of Moodle.  In previous versions (1.9) it certainly was.  I have a great staff member working on CSS to try and fix it!

Brian

In reply to Brian Pool

Re: Improved Printing of Gradebook User Reports

Dan Studebakerdən -

While exporting the user grade book may work in the short term, we were able to work with the CSS code to modify the user report when it comes to the printout only. You can make these changes to the report with CSS mods in the display of the page as well. We elected to make our changes to the printout because we use the printouts during parent-teacher conferences in a k-12 environment and needed a more simplistic example of student work for parents. Below you will see the code changes that we did for our report. Similar changes can also be made by using the inspection tool and removing items using the display: none; option like you will see below. The first line, @media print{ will make the changes only to display in the printout. Removal of this line will cause the changes to take place in the html. The code should be placed in the Custom CSS editor section of your theme.


@media print {

/*remove breadcrumb from print out*/

.breadcrumb {

   display: none;

}

/*@end*/


/*remove selection boxes from printout of user grade report*/

.form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input, .form-search .input-prepend, .form-inline .input-prepend, .form-horizontal .input-prepend, .form-search .input-append, .form-inline .input-append, .form-horizontal .input-append {

   display: none;

}

/*@end*/


/*remove administration block from side of print display*/

aside{

   display: none;

}

/*@end*/


/*remove separate group label from printout*/

.form-search label, .form-inline label, .form-search .btn-group, .form-inline .btn-group {

   display: none;

}

/*@end*/


/*remove select all or one user label from printout*/

.path-grade-report-user #graded_users_selector .singleselect label, .path-grade-report-user .view_users_selector .singleselect label {

   display: none;

}

/*@end*/


/*remove nav bar from printout*/

.nav-tabs > li, .nav-pills > li {

   display: none;

}

/*@end*/


/*remove middle nav bar from printout*/

.nav-tabs, .nav-pills {

   display: none;

}

/*@end*/


/*remove student image from printout*/

img.userpicture {

   display: none;

}

/*@end*/


/*removes side administration block from printout*/

.block {

   display: none;

}

/*@end*/


/*removes side collapsed admin block from printout*/

body.has_dock div#dock {

   display: none;

}

/*@end*/


/*removes  nav bar from printout in multi-student printing*/

.navbar {

   display: none;

}

/*@end*/


/*removes  Moodle footer from print out*/

footer{

   display: none;

}

/*@end*/


/*removes Feedback header from user report*/

.user-grade thead tr th#feedback.header.column-feedback{

display: none;

}

/*@end*/

/*removes Feedback column from userreport*/

.path-grade-report-user .user-grade tbody .column-feedback{

   display: none;

}


header{

   display: none;

}

.path-grade-report-user .user-grade tbody .column-itemname {

   padding-left: 0;

   width: 500px;

}

/*removes contribution to course total column*/

.path-grade-report-user .user-grade tbody .column-contributiontocoursetotal{

   display: none;

}

/*@end*/

/*removes contribution to course total header*/

.user-grade thead tr th#contributiontocoursetotal.header.column-contributiontocoursetotal{

display: none;

}

/*@end*/


/*removes calculated weight column*/

.path-grade-report-user .user-grade tbody .column-weight{

   display: none;

}

/*@end*/

/*removes calculated weight header*/

.user-grade thead tr th#weight.header.column-weight{

display: none;

}

/*@end*/


/*removes range column*/

.path-grade-report-user .user-grade tbody .column-range{

   display: none;

}

/*@end*/

/*removes calculated weight header*/

.user-grade thead tr th#range.header.column-range{

display: none;

}

/*@end*/


/*removes percentage column*/

.path-grade-report-user .user-grade tbody .column-percentage{

   display: none;

}

/*@end*/

/*removes calculated weight header*/

.user-grade thead tr th#percentage.header.column-percentage{

display: none;

}

/*@end*/


/*removes letter grade column*/

.path-grade-report-user .user-grade tbody .column-lettergrade{

   display: none;

}

/*@end*/

/*removes letter grade header*/

.user-grade thead tr th#lettergrade.header.column-lettergrade{

display: none;

}

/*@end*/


/*sets grade column width*/

.path-grade-report-user .user-grade tbody .column-grade{

   width: 120px;

}

/*@end*/

/*sets letter grade header width*/

.user-grade thead tr th#grade.header.column-grade{

width: 120px;

}

/*@end*/


/*removes borders from user grade report and reduces the spacing around text*/

.path-grade-report-user .user-grade.generaltable .leveleven {

border-color: transparent;

       height: 1px;

       padding:0;

       margin:0;

}

.path-grade-report-user .user-grade.generaltable .levelodd {

border-color: transparent;

       height: 1px;

       padding:0;

       margin:0;

}

/*@end*/


}

/*@end*/



In reply to Dan Studebaker

Re: Improved Printing of Gradebook User Reports

Brian Pooldən -
In reply to Brian Pool

Re: Improved Printing of Gradebook User Reports

John Provasnikdən -
Particularly helpful Moodlers istifadəçinin şəkili Testers istifadəçinin şəkili

Thank you - this was very helpful! 

Based on your work above, here are some additions that I've added to my custom printing CSS for 3.4 to make the GradeBook Setup view print better for my staff: 


@media print {


/*removes Gradebook Selection dropdown from print out*/

[id=page-grade-edit-tree-index] .urlselect {display: none;}


/*removes Gradebook Setup Select column from print out*/

[id=page-grade-edit-tree-index] thead tr th.header.column-select {display: none;}

[id=page-grade-edit-tree-index]  tbody .column-select {display: none;}


/*removes Gradebook Setup Actions column from print out*/

[id=page-grade-edit-tree-index] thead tr th.header.column-actions {display: none;}

[id=page-grade-edit-tree-index]  tbody .column-actions {display: none;}


/*removes minimized Blocks from print out*/

.block.hidden {display: none;}


}

In reply to Dan Studebaker

Re: Improved Printing of Gradebook User Reports

Rick Jerzdən -
Particularly helpful Moodlers istifadəçinin şəkili Testers istifadəçinin şəkili

Hi Dan,

I just tried this and it is really great work!  I am using Moodle 3.5 and Boost.  Even though I didn't have any problem, I think that your solution shows some of the power of changing the way Moodle behaves.

Help me out with some CSS coding.

Let's say that I want to quickly go back to Moodle's default print method.  How do I quickly do this?  Essentially, I want to keep the code in place in the Custom CSS textbox, but just quickly want to negate it.

I tried putting a "/" before @media, and a "/*" before it, but this didn't work.  Suggestions?

In reply to Rick Jerz

Re: Improved Printing of Gradebook User Reports

Dan Studebakerdən -

When I make a Custom CSS, I like to make a separate document file for the code that way I can remove it from the CSS editing box when I want to look at the original.

In reply to Dan Studebaker

Re: Improved Printing of Gradebook User Reports

Rick Jerzdən -
Particularly helpful Moodlers istifadəçinin şəkili Testers istifadəçinin şəkili

Okay.  Let me then ask, if you make a file with the code, then how does one call it from the CSS editing box?

In reply to Rick Jerz

Re: Improved Printing of Gradebook User Reports

Dan Studebakerdən -

The file is simply a word document or whatever your choice, that you cut and paste the code in and out of as needed. It is not embedded or attached to Moodle in any way. It is just a storage facility for the code.

In reply to Rick Jerz

Re: Improved Printing of Gradebook User Reports

John Provasnikdən -
Particularly helpful Moodlers istifadəçinin şəkili Testers istifadəçinin şəkili

Rick, 

I put the css styling in a doc on an external server. I call it "myspecialstyle.css"


Then I add this into my additional CSS head:

[link rel="stylesheet" type="text/css" href="http://external.server.org/myspecialstyle.css" / ]


Then, if i want to go back to default, I add !-- after the start bracket, and -- before the end bracket with this: 

[!--   AND  --]

In reply to Dan Studebaker

Re: Improved Printing of Gradebook User Reports

Fernando Acedodən -
Plugin developers istifadəçinin şəkili Testers istifadəçinin şəkili

With your permission I will add this code to Adaptable. With attribution, of course.

In reply to Dan Studebaker

Re: Improved Printing of Gradebook User Reports

Nate Coffielddən -

Dan,

I too was looking for something like this so thank you for putting it together.


Would you happen to know why I cannot get the user report to print on one page?  For me currently it breaks the report right after the student name and the grade table is on the second page.  That leaves me with a ton of empty space on the first page.  See pic for an example.


I cannot find where that page break is coming from. 

Attachment User Report Issue.png
In reply to Nate Coffield

Re: Improved Printing of Gradebook User Reports

Brian Pooldən -

Nate,

That isn't you.  We get the same thing when we print only one student.  We have to selects a group and all students in order to get the names on the page and a student to one page.  Dan and I are in the process of making a print button and having it go to a new user report page with eliminates all we did with the CSS and making it a real printout.  I had done that back in version 1.9 (dating myself) and we feel we need to do it again.  We will post it when we are done!


Brian