我在print中为course information添加了Moodle函数。使用TCPDF library和javascript,它从$description variable中打印以下内容
课程可见度和课程排序课程课程将首先按可用性排序(已提供给学生的课程将首先出现,然后是学生无法使用的课程),然后按学期进行排序。例如,如果您在本学期教授一门课程,并且学生可以使用,它将出现在您的课程列表的顶部。如果您在本学期中教授一门课程,而学生却无法使用,则在所有可供学生使用的课程之后,它将出现。 学生一年级学生二年级研究生
请注意,«courses»附带了pdf中的原始格式!
下面是我在printpdf.php中使用的代码
$html = '<html>
<body>
<img src="/moodle/theme/base/pix/logo.png" alt="test alt attribute" border="0" height="100" width="220" allign="left" /><br />
<p><span style="font-size: small;"><font color="#######">Organisation name<br><b>Directorate <br><b>Department </b><br>Subdepartment</font></span></p>
<h2>Course Information</h2>
<h3>'. $title . '</h3><br />
'. $description . '<br />
</body>
</html>';
$pdf->writeHTML($html, true, false, true, false, '');
$pdf->lastPage();
$pdf->Output('CourseInfo.pdf', 'D');是否可以像在$description页面上那样以原始格式打印它?
课程可见性与排序
Instructors:课程将首先按照可用性进行排序(已提供给学生的课程将首先出现,然后是不可供学生使用的课程),然后按学期进行排序。例如,如果您在本学期教授一门课程,并且学生可以使用,它将出现在您的课程列表的顶部。如果您在本学期中教授一门课程,而学生却无法使用,则在所有可供学生使用的课程之后,它将出现。
学生:
发布于 2015-12-14 13:38:11
您可以以html方式更改要传递给$description的printpdf.php变量。
<h2>Course Visibility and Sorting</h2>
<p>Instructors: The «courses» will be sorted first by availability (courses
that have been made available to students will show up first followed by courses
not available to students), then by semester. For example, if you are teaching a
course in the current semester and it is available to students, it will
appear at the top of your course listing. If you are teaching a course in
the current semester and it is not available to students, it will appear
after all the courses that are available to students. </p>
<h2>Students:</h2>
<br>
first year students<br>
second year students<br>
post graduate<br>https://stackoverflow.com/questions/34267573
复制相似问题