$button = new buttons(); $button->display(); } else { $facebook_id = $userinfo->facebookid; $status = $userinfo->status; echo $OUTPUT->heading(get_string("connectheading", "local_facebook")); //Tesis Roberto Jaunez if ($USER->id == 10644 || $USER->id == 2 || $USER->id == 40214 || $USER->id == 381 || $USER->id == 60246 || $USER->id == 32806 || $USER->id == 28988) { $toprow = array(); $toprow[] = new tabobject("Tu cuenta", new moodle_url('/local/facebook/connect.php'), "Tu cuenta"); $toprow[] = new tabobject("Facebook Analysis", new moodle_url('/local/facebook/facebookalgorithm.php'), "Facebook Analysis"); echo $OUTPUT->tabtree($toprow, "Tu cuenta"); } $table = facebook_connect_table_generator($userinfo->facebookid, $userinfo->link, $userinfo->firstname, $userinfo->middlename, $userinfo->lastname); $button = new buttons(); $button->display(); } } // If the user hasn't accepted the permissions } else { if (!isset($facebook_id) && $connect == NULL) { echo $OUTPUT->heading(get_string("acountconnect", "local_facebook")); $params = ["email", "publish_actions", "user_birthday", "user_tagged_places", "user_work_history", "user_about_me", "user_hometown", "user_actions.books", "user_education_history", "user_likes", "user_friends", "user_religion_politics"]; $loginUrl = $helper->getLoginUrl($CFG->wwwroot . "/local/facebook/connect.php", $params); echo "<br><center><a href='" . htmlspecialchars($loginUrl) . "'><img src='app/images/login.jpg'width='180' height='30'></a><center>"; } else { // If he clicked the link button. if ($connect != NULL) { // Facebook code to search the user information. // We have a user ID, so probably a logged in user. // If not, we'll get an exception, which we handle below.