From 7942f4377a708ee383c880dece110edef4da8036 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 28 Mar 2008 06:32:13 +0000 Subject: [PATCH] MDL-14086 Hide navigation tabs when being forced to complete profile --- lang/en_utf8/moodle.php | 1 + user/tabs.php | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lang/en_utf8/moodle.php b/lang/en_utf8/moodle.php index 226a2b0f73e..12970a2cc5d 100644 --- a/lang/en_utf8/moodle.php +++ b/lang/en_utf8/moodle.php @@ -954,6 +954,7 @@ $string['moodledocslink'] = 'Moodle Docs for this page'; $string['moodleversion'] = 'Moodle Version'; $string['more'] = 'more'; $string['moreinformation'] = 'More information about this error'; +$string['moreprofileinfoneeded'] = 'Please tell us more about yourself'; $string['mostrecently'] = 'most recently'; $string['move'] = 'Move'; $string['movecategoryto'] = 'Move category to:'; diff --git a/user/tabs.php b/user/tabs.php index 82f9263793b..a329943fd00 100644 --- a/user/tabs.php +++ b/user/tabs.php @@ -246,8 +246,12 @@ $tabs = array($toprow); } -/// Print out the tabs and continue! - - print_tabs($tabs, $currenttab, $inactive, $activetwo); + if ($currenttab == 'editprofile' && ($user->id == $USER->id) && user_not_fully_set_up($USER)) { + /// We're being forced here to fix profile + notify(get_string('moreprofileinfoneeded')); + } else { + /// Print out the tabs and continue! + print_tabs($tabs, $currenttab, $inactive, $activetwo); + } ?>