Last active
June 11, 2017 13:51
-
-
Save ostearn/6d3018ea6ef55580d402855adb1e0cd1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$all_comp_courses = $DB->get_records_sql('SELECT * FROM {course_completion_crit_compl} WHERE userid = ?', array($USER->id)); | |
$root = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/'; | |
foreach ($all_comp_courses as $comp_array) { | |
//$this->content->text .= "Course: ".$comp_array -> course; | |
$this->content->text .= '<script> | |
var coursetile = $(\'a[href$="'.$root.'course/view.php?id='.$comp_array -> course.'"]\').siblings(".panel-body").find(".cimbox").addClass("course_complete"); | |
</script>'; | |
// $this->content->items[] .= "<script>$(".coursebox-content").css("color", "red");</script>" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment