Skip to content

Commit

Permalink
Fixed the completion criteria section list issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasanthlmsace committed Sep 23, 2024
1 parent 6cf5068 commit 7270848
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 0 additions & 3 deletions classes/cache/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ class loader extends \cache_application {
public function delete_vaild_section_completed_cache($courseid, $sectionid = 0) {
$store = $this->get_store();
$prefix = "v_s_c_c_{$courseid}";
if ($sectionid) {
$prefix .= "_s_{$sectionid}";
}
if ($list = $store->find_by_prefix($prefix)) {
$keys = array_map(function($key) {
$key = current(explode('-', $key));
Expand Down
10 changes: 6 additions & 4 deletions classes/output/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ public static function criteria_progress($course, $userid) {
}
}

if ($isapplycompletioncourses && $complteioncourses) {
if ($isapplycompletioncourses && $complteioncourses) {
foreach ($complteioncourses as $coursecriteria) {
$courseid = $coursecriteria->courseinstance;
$course = get_course($courseid);
Expand All @@ -691,6 +691,7 @@ public static function criteria_progress($course, $userid) {
}
}


if (format_designer_has_pro()) {
$sectiontooltiplink = '';
if (isset($course->calcourseprogress) && $course->calcourseprogress == DESIGNER_PROGRESS_SECTIONS
Expand All @@ -706,8 +707,8 @@ public static function criteria_progress($course, $userid) {
($course->calsectionprogress == DESIGNER_PROGRESS_RELEVANTACTIVITIES) ? true : false;
if (\format_designer\options::is_section_completed($section, $course, $modinfo,
true, $realtiveactivities)) {
$completed += 1;
$completedcriteria[] = $sectiontooltiplink;
$completed += 1;
$completedcriteria[] = $sectiontooltiplink;
} else {
if (\format_designer\options::is_vaild_section_completed($section, $course,
$modinfo, $realtiveactivities) == "true") {
Expand All @@ -717,9 +718,10 @@ public static function criteria_progress($course, $userid) {
}
}
}
$completedcriteria[] = $sectiontooltiplink;
}



$percent = ($completed / $count) * 100;
$completioncriteriahtml = '';
$uncompletioncriteriahtml = '';
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024092100; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2024092300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2020061500; // Requires this Moodle version.
$plugin->component = 'format_designer'; // Full name of the plugin (used for diagnostics).
$plugin->release = 'Version 1.5';
Expand Down

0 comments on commit 7270848

Please sign in to comment.