Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'wip-mdl-31623-m23' of git://github.com/rajeshtaneja/moo…

…dle into MOODLE_23_STABLE
  • Loading branch information...
commit accaf1d277219111362d193f8c7d3989f31a4565 2 parents fd3e329 + e24b125
@nebgor nebgor authored
Showing with 6 additions and 6 deletions.
  1. +3 −3 course/reset_form.php
  2. +3 −3 lib/moodlelib.php
View
6 course/reset_form.php
@@ -61,13 +61,13 @@ function definition (){
if ($allmods = $DB->get_records('modules') ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
- if (!$DB->count_records($modname, array('course'=>$COURSE->id))) {
- continue; // skip mods with no instances
- }
$modfile = $CFG->dirroot."/mod/$modname/lib.php";
$mod_reset_course_form_definition = $modname.'_reset_course_form_definition';
$mod_reset__userdata = $modname.'_reset_userdata';
if (file_exists($modfile)) {
+ if (!$DB->count_records($modname, array('course'=>$COURSE->id))) {
+ continue; // Skip mods with no instances
+ }
include_once($modfile);
if (function_exists($mod_reset_course_form_definition)) {
$mod_reset_course_form_definition($mform);
View
6 lib/moodlelib.php
@@ -4961,12 +4961,12 @@ function reset_course_userdata($data) {
if ($allmods = $DB->get_records('modules') ) {
foreach ($allmods as $mod) {
$modname = $mod->name;
- if (!$DB->count_records($modname, array('course'=>$data->courseid))) {
- continue; // skip mods with no instances
- }
$modfile = $CFG->dirroot.'/mod/'. $modname.'/lib.php';
$moddeleteuserdata = $modname.'_reset_userdata'; // Function to delete user data
if (file_exists($modfile)) {
+ if (!$DB->count_records($modname, array('course'=>$data->courseid))) {
+ continue; // Skip mods with no instances
+ }
include_once($modfile);
if (function_exists($moddeleteuserdata)) {
$modstatus = $moddeleteuserdata($data);
Please sign in to comment.
Something went wrong with that request. Please try again.