From de055e229ed421bd55283cf3612b014adf159f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=ABl=20Dieschburg?= Date: Fri, 27 Feb 2009 20:14:01 +0100 Subject: [PATCH] [svn r18740] Adds get_status_from_code($status_code) in the api. It returns the status string corresponding to the code. --- main/inc/lib/main_api.lib.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/main/inc/lib/main_api.lib.php b/main/inc/lib/main_api.lib.php index 3337bb0bf1..478e0b8afe 100644 --- a/main/inc/lib/main_api.lib.php +++ b/main/inc/lib/main_api.lib.php @@ -922,6 +922,32 @@ function domesticate($input) { return ($input); } +/** +* Returns the status string corresponding to the status code +* @author Noel Dieschburg +* @param the int status code +*/ +function get_status_from_code($status_code) +{ + switch ($status_code) { + case STUDENT: + return get_lang('Student'); + case TEACHER: + return get_lang('Teacher'); + case COUSEMANAGER: + return get_lang('Manager'); + case ADMINCRFP: + return get_lang('AdminCrfp'); + case DRH: + return get_lang('Drh'); + + } + +} + + + + /* ============================================================================== FAILURE MANAGEMENT