Skip to content

Commit

Permalink
Typos like "activitiy" fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Dec 9, 2024
1 parent f870d27 commit 678b06a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions classes/output/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ public function course_type_class($course) {
*/
public function course_type_sectionclasses($course, $section, $modinfo) {
$attrs = $contentattrs = [];
$contentclass = $actvitiyclass = '';
$contentclass = $activityclass = '';
$class = "";
if ($course->coursetype == DESIGNER_TYPE_COLLAPSIBLE) {
$attrs[] = 'data-toggle="collapse"';
Expand All @@ -864,7 +864,7 @@ public function course_type_sectionclasses($course, $section, $modinfo) {
'classes' => $contentclass,
],
'activity' => [
'classes' => $actvitiyclass,
'classes' => $activityclass,
],
];
}
Expand Down
2 changes: 1 addition & 1 deletion lang/en/format_designer.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
$string['modmasksize'] = 'Activity mask size';
$string['modmaskposition'] = 'Activity mask position';

$string['heroactivity'] = "Hero activitiy";
$string['heroactivity'] = "Hero activity";
$string['everywhere'] = "Everywhere";
$string['onlycoursepage'] = "Only on course main page";
$string['showastab'] = "Show as tab";
Expand Down
14 changes: 7 additions & 7 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@

define('DESIGNER_HERO_ZERO_VISIBLE', 2);

define('DESIGNER_HERO_ACTVITIY_DISABLED', 0);
define('DESIGNER_HERO_ACTIVITY_DISABLED', 0);

define('DESIGNER_HERO_ACTVITIY_EVERYWHERE', 1);
define('DESIGNER_HERO_ACTIVITY_EVERYWHERE', 1);

define('DESIGNER_HERO_ACTVITIY_COURSEPAGE', 2);
define('DESIGNER_HERO_ACTIVITY_COURSEPAGE', 2);

define('DESIGNER_MOD_TEXT_TRIMM', 0);

Expand Down Expand Up @@ -2133,7 +2133,7 @@ function format_designer_popup_installed() {
function format_designer_course_has_heroactivity($course) {
global $DB, $PAGE;
$iscourseheroactivity = ($course->sectionzeroactivities &&
$course->heroactivity == DESIGNER_HERO_ACTVITIY_EVERYWHERE) ? true : false;
$course->heroactivity == DESIGNER_HERO_ACTIVITY_EVERYWHERE) ? true : false;
$sql = "SELECT fd.value FROM {format_designer_options} fd
WHERE fd.courseid = :courseid AND fd.name = :optionname AND fd.value = :optionvalue AND fd.cmid != :currentcm";
$iscoursemodheroactivity = $DB->record_exists_sql($sql, ['optionname' => 'heroactivity',
Expand Down Expand Up @@ -2301,7 +2301,7 @@ function format_designer_extend_navigation_course($navigation, $course, $context
$nodepos = $report['heroactivitypos'];
$cmtitle = $format->get_cm_secondary_title($cm);
if ($PAGE->context->contextlevel == CONTEXT_MODULE) {
if ($report['heroactivity'] == DESIGNER_HERO_ACTVITIY_EVERYWHERE) {
if ($report['heroactivity'] == DESIGNER_HERO_ACTIVITY_EVERYWHERE) {
if ($cm->id == $PAGE->cm->id && $heroactivityduplicate) {
$ishidecurrentcmid = true;
}
Expand Down Expand Up @@ -2524,11 +2524,11 @@ function format_designer_section_zero_tomake_hero($reports, $course) {
foreach ($modinfo->sections[0] as $modnumber) {
if ($DB->record_exists('course_modules', ['deletioninprogress' => 0, 'id' => $modnumber])) {
if (isset($reports[$modnumber]) && !$reports[$modnumber]['heroactivity']) {
$reports[$modnumber]['heroactivity'] = ($course->heroactivity == DESIGNER_HERO_ACTVITIY_COURSEPAGE
$reports[$modnumber]['heroactivity'] = ($course->heroactivity == DESIGNER_HERO_ACTIVITY_COURSEPAGE
&& isset($PAGE->cm->id)) ? 0 : ($course->heroactivity == true);
$reports[$modnumber]['heroactivitypos'] = $course->heroactivitypos;
} else if (!isset($reports[$modnumber])) {
$reports[$modnumber]['heroactivity'] = ($course->heroactivity == DESIGNER_HERO_ACTVITIY_COURSEPAGE
$reports[$modnumber]['heroactivity'] = ($course->heroactivity == DESIGNER_HERO_ACTIVITY_COURSEPAGE
&& isset($PAGE->cm->id)) ? 0 : ($course->heroactivity == true);
$reports[$modnumber]['heroactivitypos'] = $course->heroactivitypos;
$reports[$modnumber]['cmid'] = $modnumber;
Expand Down

0 comments on commit 678b06a

Please sign in to comment.