Skip to content

Commit

Permalink
Merge branch 'release/2.0.4'
Browse files Browse the repository at this point in the history
* release/2.0.4:
  fix(documents): Shortened long course names in exported documents.
  fix(files): Renamed more files from camelCase to lowercase.
  • Loading branch information
Daniel Nolte committed Feb 26, 2024
2 parents 81046b7 + 0e2fe68 commit 371d1c0
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Changelog ##

- [2.0.4]:
- Shortened long course names in exported documents.

- [2.0.3]:
- Renamed more files from camelCase to lowercase.

- [2.0.2]:
- Renamed files from camelCase to lowercase.

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ public function header() {
throw new moodle_exception('missingparameter');
}

if (strlen($course->fullname) <= 40) {
$coursename = $course->fullname;
} else {
$coursename = $course->shortname;
}

if (file_exists(__DIR__.'/../../data/logo_full.ai')) {
$this->ImageEps(__DIR__.'/../../data/logo_full.ai', 25, 12, 70);
$this->SetFont('freeserif', 'B', 22);
Expand All @@ -79,8 +85,7 @@ public function header() {
$this->SetTextColor(0, 0, 0);
$this->SetFont('freeserif', '', 14);
$this->MultiCell(130, 50, strtoupper(helper::getcleancoursecategoryname()) . ' / ' .
$course->fullname . ' ('. $moduleinstance->name .
')', 0, 'L', 0, 0, 25, 40);
$coursename . ' (' . $moduleinstance->name . ')', 0, 'L', 0, 0, 25, 40);
$this->MultiCell(26, 50, helper::gethrexamtime($moduleinstance), 0, 'R', 0, 0, 159, 40);
}

Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 8 additions & 2 deletions classes/pdfs/seatingPlan.php → classes/pdfs/seatingplan.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ public function header() {
} else {
throw new moodle_exception('missingparameter');
}

if (strlen($course->fullname) <= 40) {
$coursename = $course->fullname;
} else {
$coursename = $course->shortname;
}

if (file_exists(__DIR__.'/../../data/logo_full.ai')) {
$this->ImageEps(__DIR__.'/../../data/logo_full.ai', 25, 12, 70);
$this->SetFont('helvetica', 'B', 22);
Expand All @@ -70,8 +77,7 @@ public function header() {

$this->SetFont('helvetica', 'B', 14);
$this->MultiCell(130, 5, strtoupper(helper::getcleancoursecategoryname()) . ' / ' .
$course->fullname . ' ('. $moduleinstance->name .')',
0, 'L', 0, 0, 25, 40);
$coursename . ' (' . $moduleinstance->name . ')', 0, 'L', 0, 0, 25, 40);
$this->MultiCell(26, 5, helper::gethrexamtime($moduleinstance), 0, 'R', 0, 0, 159, 40);
}

Expand Down
8 changes: 7 additions & 1 deletion exportresultsexamreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,14 @@
$pdf->SetFont('helvetica', '', 16);
$pdf->MultiCell(130, 3, get_string('pointslist_examreview', 'mod_exammanagement'), 0, 'C', 0, 0, 50, 17);

if (strlen($course->fullname) <= 40) {
$coursename = $course->fullname;
} else {
$coursename = $course->shortname;
}

$pdf->SetFont('helvetica', 'B', 16);
$pdf->MultiCell(130, 3, $course->fullname . ', ' . $moduleinstance->name, 0, 'C', 0, 0, 50, 25);
$pdf->MultiCell(130, 3, $coursename . ', ' . $moduleinstance->name, 0, 'C', 0, 0, 50, 25);
$pdf->SetFont('helvetica', '', 16);

$date = helper::gethrexamtime($moduleinstance);
Expand Down
8 changes: 7 additions & 1 deletion exportresultspercentages.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,14 @@
$pdf->SetFont('helvetica', '', 16);
$pdf->MultiCell(130, 3, get_string('pointslist_examreview', 'mod_exammanagement'), 0, 'C', 0, 0, 50, 17);

if (strlen($course->fullname) <= 40) {
$coursename = $course->fullname;
} else {
$coursename = $course->shortname;
}

$pdf->SetFont('helvetica', 'B', 16);
$pdf->MultiCell(130, 3, $course->fullname . ', ' . $moduleinstance->name, 0, 'C', 0, 0, 50, 25);
$pdf->MultiCell(130, 3, $coursename . ', ' . $moduleinstance->name, 0, 'C', 0, 0, 50, 25);
$pdf->SetFont('helvetica', '', 16);

$date = helper::gethrexamtime($moduleinstance);
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_exammanagement'; // Full name of the plugin (used for diagnostics).
$plugin->release = '2.0.2'; // User-friendly version number.
$plugin->version = 2024022301; // The current module version (Date: YYYYMMDDXX).
$plugin->release = '2.0.4'; // User-friendly version number.
$plugin->version = 2024022601; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2020061500; // Requires this Moodle version.
$plugin->maturity = MATURITY_STABLE;

0 comments on commit 371d1c0

Please sign in to comment.