} //Increament Total Meetings for all users after skype has been imported $total_meetings = $DB->get_records('project_user_mapping', array('group_id' => $currentgroup), null, 'group_id,meetings_total', 0, 1); $inc_total = $total_meetings[$currentgroup]->meetings_total; $DB->set_field('project_user_mapping', 'meetings_total', ++$inc_total, array('group_id' => $currentgroup)); //reset users meeting alert $DB->set_field('project_user_mapping', 'meeting_alert', 0, array('group_id' => $currentgroup)); //If all all mapped, redirect page, skipping form if (!$unmapped) { redirect('view.php?id=' . $cmid); } $user_map = array(); //Create the array $user_map[0] = ""; //Add Blank option foreach ($mapped_users as $member) { //Fill the array with usernames $user_map[$member->user_id] = studentidToName($member->user_id); } //end for each $mapped_form = new history_map_users(null, array('group_members' => $user_map, 'convo_members' => $names_unique, 'history' => $history)); } echo $OUTPUT->header(); echo $OUTPUT->heading(format_string('Chat History Import'), 2); if ($mapped) { $mapped_form->display(); } $mform->display(); //$strlastmodified = get_string("lastmodified"); //echo "<div class=\"modified\">$strlastmodified: ".userdate($project->timemodified)."</div>"; echo $OUTPUT->footer();
//Store last records of time and user incase missing from text. $last_record['time']=$time; $last_record['user']=$history->user; //print_r($history);break; //$history->id = $DB->insert_record('project_history_import_detail', $history); }//end for each loop //Remove the SYSTEM user since it will never be assigned. if(($key = array_search("SYSTEM", $names_unique)) !== false) { unset($names_unique[$key]); }//end if }//End if method is skype //If history method is email. elseif($summary->method=="Email") { } //add_to_log($course->id, 'course', 'update mod', '../mod/project/view.php?id='.$cm->id, 'project '.$project->id);*/ } //redirect("history_import.php?cmid=$cm->id&mapped=true"); //book_preload_chapters($book); // fix structure //redirect("view.php?id=$cm->id"); } } echo $OUTPUT->header(); echo $OUTPUT->heading(format_string('Chat History Import'), 2); $mform->display(); //$strlastmodified = get_string("lastmodified"); //echo "<div class=\"modified\">$strlastmodified: ".userdate($project->timemodified)."</div>"; echo $OUTPUT->footer();