Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/GradingMenuBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ export class ModalMenuBar extends React.Component {
const exitAction = this.props.exitAction;
const text = this.props.text;
return (
<div style={{
<div
className="noprint"
style={{
padding: "5px 0px 5px 0px", width: "100%", display:"inline-block",
backgroundColor: "#212121", color : "#efefef"}}
>
Expand Down
46 changes: 24 additions & 22 deletions src/PrinterFriendlyAssignmentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { aggregateStudentWork, calculateGradingOverview } from './TeacherInteractiveGrader.js';
import { StudentWork } from './SolutionGrader.js';

const ASSIGNMENT_NAME = 'ASSIGNMENT_NAME';
const PROBLEMS = 'PROBLEMS';
const PROBLEM_NUMBER = 'PROBLEM_NUMBER';

Expand All @@ -11,28 +12,29 @@ export default class PrinterFriendlyAssignmentView extends React.Component {
const assignment = this.props.assignment;

return (
<div style={{minHeight: "100vh", padding:"30px 15px 100px 15px"}}>
<div className="answer-partially-correct"
style={{display:"inline-block", padding:"5px", margin: "5px"}}>
<span>Only submit a PDF to your instructor if requested, the regular save feature for Free Math that produces a .math file should be preferred in most cases.</span>
</div>
<div>
{ assignment[PROBLEMS].map(
(problem => {
return (
<div>
<h3 style={{display:"block", clear: "left"}}>Problem {problem[PROBLEM_NUMBER]}</h3>
<StudentWork solutionGradeInfo={problem} viewingSimilarGroup={true}/>
<div style={{display:"block", clear: "left"}}>
<br />
<br />
</div>
</div>
)
})
)}
</div>
</div>
<div style={{ padding:"30px 15px 100px 15px" }}>
<div className="answer-partially-correct noprint" style={{display:"inline-block", padding:"5px", margin: "5px"}}>
<span>Only submit a PDF to your instructor if requested, the regular save feature for Free Math that produces a .math file should be preferred in most cases.</span>
</div>
<h2>{assignment[ASSIGNMENT_NAME]}</h2>
<p>Created using Free Math (<a href="freemathapp.org">freemathapp.org</a>)</p>
<div>
{ assignment[PROBLEMS].map(
(problem => {
return (
<div key={problem[PROBLEM_NUMBER]} style={{ breakInside: "avoid" }}>
<h3 style={{display:"block", clear: "left"}}>Problem {problem[PROBLEM_NUMBER]}</h3>
<StudentWork solutionGradeInfo={problem} viewingSimilarGroup={true}/>
<div style={{display:"block", clear: "left"}}>
<br />
<br />
</div>
</div>
)
})
)}
</div>
</div>
);
}
}
10 changes: 10 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -835,3 +835,13 @@ span.solution-step {
margin: 5px 5px 5px 5px;
padding: 5px 5px 5px 5px;
}

@media print {
.noprint {
display: none !important;
}
.whiteprint {
background-color: white;
color: black;
}
}