From e963b8fccf42a68db3dd27eac893417a25b4593e Mon Sep 17 00:00:00 2001 From: Carlos Vargas Date: Fri, 12 Mar 2010 16:20:18 -0500 Subject: [PATCH 1/2] DLTT Import --- main/lang/english/admin.inc.php | 14 +++++++++++-- main/lang/english/dropbox.inc.php | 1 + main/lang/english/exercice.inc.php | 2 ++ main/lang/english/index.inc.php | 1 + main/lang/english/registration.inc.php | 1 + main/lang/english/trad4all.inc.php | 25 ++++++++++++++++++++++++ main/lang/spanish/trad4all.inc.php | 27 ++++++++++++++++++++++++-- 7 files changed, 67 insertions(+), 4 deletions(-) diff --git a/main/lang/english/admin.inc.php b/main/lang/english/admin.inc.php index 469fb980dd..ca8755a6b1 100644 --- a/main/lang/english/admin.inc.php +++ b/main/lang/english/admin.inc.php @@ -1138,10 +1138,10 @@ $AssignedSessionsHaveBeenUpdatedSuccessfully = "The assigned sessions have been $AssignedCoursesHaveBeenUpdatedSuccessfully = "The assigned courses have been updated"; $AssignedUsersHaveBeenUpdatedSuccessfully = "The assigned users have been updated"; $Lock = "Lock"; -$AssignUsersTo = "Assign users to"; +$AssignUsersToX = "Assign users to"; $AssignUsersToHumanResourcesManager = "Assign users to Human Resources manager"; $AssignedUsersListToHumanResourcesManager = "List of users assigned to Human Resources manager"; -$AssignCoursesTo = "Assign courses to"; +$AssignCoursesToX = "Assign courses to %s"; $SessionsListInPlatform = "List of sessions on the platform"; $AssignSessionsToHumanResourcesManager = "Assign sessions to Human Resources manager"; $AssignedSessionsListToHumanResourcesManager = "List of sessions assigned to the Human Resources manager"; @@ -1197,4 +1197,14 @@ $ServerPortInfo = "Server port"; $ServerUserAgentInfo = "Your user agent as received by the server"; $ServerSoftwareInfo = "Software running as a web server"; $UnameInfo = "Information on the system the current server is running on"; +$AssignSessionsToX = "Assign sessions to %s"; +$AssignCoursesToSessionsAdministrator = "Assign courses to session's administrator"; +$AssignCoursesToPlatformAdministrator = "Assign courses to platform's administrator"; +$AssignedCoursesListToPlatformAdministrator = "Assigned courses list to platform administrator"; +$AssignedCoursesListToSessionsAdministrator = "Assigned courses list to sessions administrator"; +$AssignSessionsToPlatformAdministrator = "Assign sessions to platform administrator"; +$AssignSessionsToSessionsAdministrator = "assign sessions to sessions administrator"; +$AssignedSessionsListToPlatformAdministrator = "Assigned sessions list to platform administrator"; +$AssignedSessionsListToSessionsAdministrator = "Assigned sessions list to sessions administrator"; +$EvaluationsGraph = "graph of evaluations"; ?> \ No newline at end of file diff --git a/main/lang/english/dropbox.inc.php b/main/lang/english/dropbox.inc.php index b58bd4cad7..934f867b01 100644 --- a/main/lang/english/dropbox.inc.php +++ b/main/lang/english/dropbox.inc.php @@ -95,6 +95,7 @@ $DocAdd = "Document has been added successfully"; $FileDeleted = "The selected file has been removed from your dropbox."; $MailingAsUsername = "Mailing"; $MailingInSelect = "---Mailing---"; +$$MailingExamine = "Examine mailing"; $MailingNotYetSent = "Mailing content files have not yet been sent out..."; $MailingSend = "Validate"; $MailingConfirmSend = "Send content files to individuals?"; diff --git a/main/lang/english/exercice.inc.php b/main/lang/english/exercice.inc.php index 811c034bbe..085edcdb28 100644 --- a/main/lang/english/exercice.inc.php +++ b/main/lang/english/exercice.inc.php @@ -361,4 +361,6 @@ $AreYouSureToCopy = "Are you sure to copy"; $ExerciseCopied = "Exercise copied"; $AreYouSureToDeleteResults = "Are you sure to delete results"; $XResultsCleaned = "%d results cleaned"; +$CopyExercise = "Copy this exercise as a new one"; +$CleanStudentResults = "Clear all students results for this exercise"; ?> \ No newline at end of file diff --git a/main/lang/english/index.inc.php b/main/lang/english/index.inc.php index b620a4ba28..bf84ac4135 100644 --- a/main/lang/english/index.inc.php +++ b/main/lang/english/index.inc.php @@ -73,4 +73,5 @@ $PendingInvitations = "Pending invitations"; $YouDoNotHaveAnySessionInItsHistory = "You do not have any training session in its history"; $PortalHomepageDefaultIntroduction = "

Congratulations! You have successfully installed your e-learning portal!

You can now complete the installation by following three easy steps:

  1. Configure you portal by going to the administration section, and select the Portal -> Configuration settings entry.
  2. Add some life to your portal by creating users and/or training. You can do that by inviting new people to create their accounts or creating them yourself through the administration's Users and Training sections.
  3. Edit this page through the Edit portal homepage entry in the administration section.

You can always find more information about this software on our website: http://www.chamilo.org.

Have fun, and don't hesitate to join the community and give us feedback through our forum.

"; $LoginEnter = "Login"; +$Username = "User name"; ?> \ No newline at end of file diff --git a/main/lang/english/registration.inc.php b/main/lang/english/registration.inc.php index 4c9ff733ab..273b84a8c9 100644 --- a/main/lang/english/registration.inc.php +++ b/main/lang/english/registration.inc.php @@ -176,4 +176,5 @@ $LostPass = "Forgot your password ?"; $EnterEmailUserAndWellSendYouPassword = "Enter the username or the email address with which you registered and we will send your password."; $NoUserAccountWithThisEmailAddress = "There is no account with this user and/or e-mail address"; $WithTheFollowingSettings = "with the following settings:"; +$CouldNotResetPassword = "Could not reset password"; ?> \ No newline at end of file diff --git a/main/lang/english/trad4all.inc.php b/main/lang/english/trad4all.inc.php index f9084586ad..37c3e17988 100644 --- a/main/lang/english/trad4all.inc.php +++ b/main/lang/english/trad4all.inc.php @@ -814,4 +814,29 @@ $CleanCalendar = "Clean the calendar of all lists"; $AttendanceCalendarDescription = "The attendance calendar allows you to register attendance lists (one per real session the students need to attend). Add new attendance lists here."; $CalendarList = "Calendar list of attendances"; $ThereAreNoRegisteredDatetimeYet = "There is no date/time registered yet"; +$DashboardPluginsHaveBeenUpdatedSucesslly = "Dashboard plugins have been updated sucessfully"; +$LoginEnter = "Login"; +$ToolCourseDescription = "Course description"; +$ToolDocument = "Documents"; +$ToolLearnpath = "Courses"; +$ToolLink = "Links"; +$ToolQuiz = "Tests"; +$ToolAnnouncement = "Announcements"; +$ToolGradebook = "Assessments"; +$ToolGlossary = "Glossary"; +$ToolAttendance = "Attendances"; +$ToolCalendarEvent = "Agenda"; +$ToolForum = "Forums"; +$ToolDropbox = "Dropbox"; +$ToolUser = "Users"; +$ToolGroup = "Groups"; +$ToolChat = "Chat"; +$ToolStudentPublication = "Assignments"; +$ToolSurvey = "Surveys"; +$ToolWiki = "Wiki"; +$ToolNotebook = "Notebook"; +$ToolBlogManagement = "Projects"; +$ToolTracking = "Reporting"; +$ToolCourseSetting = "Settings"; +$ToolCourseMaintenance = "Backup"; ?> \ No newline at end of file diff --git a/main/lang/spanish/trad4all.inc.php b/main/lang/spanish/trad4all.inc.php index 7bc8f655a8..c5dadf4936 100644 --- a/main/lang/spanish/trad4all.inc.php +++ b/main/lang/spanish/trad4all.inc.php @@ -326,7 +326,7 @@ $SelectGroupsUsers = "Seleccionar grupos/usuarios"; $Student = "Estudiante"; $Teacher = "Profesor"; $Send2All = "No seleccionó ningún usuario / grupo. Este item será visible por todos los usuarios."; -$Wiki = "Wiki del grupo"; +$Wiki = "Wiki"; $Complete = "Completado"; $Incomplete = "Sin completar"; $reservation = "reservar"; @@ -795,7 +795,7 @@ $EnableDashboardBlock = "Habilitar bloque del panel de control"; $ThereAreNoEnabledDashboardPlugins = "No hay habilitado ningún plugin en el panel de control"; $Enabled = "Habilitado"; $ThematicAdvanceQuestions = "¿ Cuál es el progreso actual que ha alcanzado con sus alumnos en el curso? ¿Cuánto resta para completar el programa del curso?"; -$ThematicAdvanceHistory = "Avance del historial"; +$ThematicAdvanceHistory = "Historial del avance temático"; $Homepage = "Página principal"; $Attendances = "Asistencia"; $CountDoneAttendance = "# asistencias"; @@ -816,4 +816,27 @@ $CalendarList = "Lista de calendario"; $ThereAreNoRegisteredDatetimeYet = "No hay fecha/hora registrada todavía"; $DashboardPluginsHaveBeenUpdatedSucesslly = "Los plugins del panel de control han sido actualizados correctamente"; $LoginEnter = "Entrar"; +$ToolCourseDescription = "Descripción del curso"; +$ToolDocument = "Documentos"; +$ToolLearnpath = "Lecciones"; +$ToolLink = "Enlaces"; +$ToolQuiz = "Ejercicios"; +$ToolAnnouncement = "Anuncios"; +$ToolGradebook = "Evaluaciones"; +$ToolGlossary = "Glosario"; +$ToolAttendance = "Asistencias"; +$ToolCalendarEvent = "Agenda"; +$ToolForum = "Foros"; +$ToolDropbox = "Compartir documentos"; +$ToolUser = "Usuarios"; +$ToolGroup = "Grupos"; +$ToolChat = "Chat"; +$ToolStudentPublication = "Tareas"; +$ToolSurvey = "Encuestas"; +$ToolWiki = "Wiki"; +$ToolNotebook = "Notas personales"; +$ToolBlogManagement = "Gestión de blogs"; +$ToolTracking = "Informes"; +$ToolCourseSetting = "Configuración del curso"; +$ToolCourseMaintenance = "Mantenimiento del curso"; ?> \ No newline at end of file From 465c8a403bad10112f0bdce104fbacfeabd3488f Mon Sep 17 00:00:00 2001 From: Cristian Fasanando Date: Fri, 12 Mar 2010 16:23:42 -0500 Subject: [PATCH 2/2] fixed - display all students or teachers informations graph - partial BT#540 --- .../block_student_graph.class.php | 156 +----------------- .../block_teacher_graph.class.php | 55 ++---- 2 files changed, 21 insertions(+), 190 deletions(-) diff --git a/plugin/dashboard/block_student_graph/block_student_graph.class.php b/plugin/dashboard/block_student_graph/block_student_graph.class.php index bb85fc26a5..37b35ccc0a 100755 --- a/plugin/dashboard/block_student_graph/block_student_graph.class.php +++ b/plugin/dashboard/block_student_graph/block_student_graph.class.php @@ -125,9 +125,6 @@ class BlockStudentGraph extends Block { arsort($attendances_faults_avg); $usernames = array_keys($attendances_faults_avg); - - // get only until five users - if (count($usernames) > 5) { array_splice($usernames,5); } $faults = array(); foreach ($usernames as $username) { @@ -140,13 +137,10 @@ class BlockStudentGraph extends Block { if (is_array($usernames) && count($usernames) > 0) { // Defining data - $data_set = new pData; - + $data_set = new pData; $data_set->AddPoint($faults,"Promedio"); $data_set->AddPoint($usernames,"Usuario"); - $data_set->AddAllSeries(); - //$data_set->SetYAxisName(get_lang('UserName')); - //$data_set->SetXAxisName(get_lang('AttendancesFaults')); + $data_set->AddAllSeries(); $data_set->SetAbsciseLabelSerie("Usuario"); // prepare cache for saving image @@ -161,16 +155,11 @@ class BlockStudentGraph extends Block { } else { // Initialise the graph - $test = new MyHorBar(400,280); - //$Test->setFontProperties("Fonts/tahoma.ttf",8); + $test = new MyHorBar(400,330); $test->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf', 8); - //$test->setGraphArea(120,60,450,650); - $test->setGraphArea(65,30,350,200); - //$Test->setFixedScale(0,5,5,0,0,0); - //$test->drawFilledRoundedRectangle(7,7,493,693,5,240,240,240); - $test->drawFilledRoundedRectangle(7,7,393,253,5,240,240,240); - //$test->drawRoundedRectangle(5,5,495,695,5,230,230,230); - $test->drawRoundedRectangle(5,5,395,255,5,230,230,230); + $test->setGraphArea(65,30,350,250); + $test->drawFilledRoundedRectangle(7,7,393,303,5,240,240,240); + $test->drawRoundedRectangle(5,5,395,305,5,230,230,230); $test->drawGraphArea(255,255,255,TRUE); $test->setFixedScale(0,100,5); $test->drawHorScale($data_set->GetData(),$data_set->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2,TRUE); @@ -196,138 +185,7 @@ class BlockStudentGraph extends Block { } } else { $graph = '

'.api_convert_encoding(get_lang('GraphicNotAvailable'),'UTF-8').'

'; - } - - - /* - $students = $this->students; - $attendance = new Attendance(); - - // get data - $attendances_faults_avg = array(); - - foreach ($students as $student) { - $student_id = $student['user_id']; - $student_info = api_get_user_info($student_id); - // get average of faults in attendances by student - $results_faults_avg = $attendance->get_faults_average_inside_courses($student_id); - if (!empty($results_faults_avg)) { - $attendances_faults_avg[$student_info['username']] = $results_faults_avg['porcent']; - } else { - $attendances_faults_avg[$student_info['username']] = 0; - } - } - - arsort($attendances_faults_avg); - $usernames = array_keys($attendances_faults_avg); - - // get only until five users - if (count($usernames) > 5) { array_splice($usernames,5); } - - $faults = array(); - foreach ($usernames as $username) { - $faults[] = $attendances_faults_avg[$username]; - } - - $graph = ''; - $img_file = ''; - - if (is_array($usernames) && count($usernames) > 0) { - - // Defining data - - $data_set = new pData; - - - $data_set->AddPoint($faults,"Promedio"); // $this->Data = array(0=>array('Promedio'=>57,'Name'=>0), 1=>array('Promedio'=>43,'Name'=>1), 2=>array('Promedio'=>29,'Name'=>2)) - $data_set->AddPoint($usernames,"Usuario"); // $this->Data = array(0=>array('Usuario'=>'alumno3','Name'=>0), 1=>array('Usuario'=>'alumno1','Name'=>1), 2=>array('Usuario'=>'alumno2','Name'=>2)) - - $data_set->AddAllSeries(); // $this->DataDescription = array('Position'=>'Name', 'Format'=>array('X'=>'number','Y'=>'number'), 'Unit'=>array('X'=>null,'Y'=null),'Values'=>array(0=>'Promedio',1=>'Usuario')) - - $data_set->SetXAxisName(get_lang('UserName')); // $this->DataDescription["Axis"]["X"] = 'UserName'; - $data_set->SetYAxisName(get_lang('AttendancesFaults')); // $this->DataDescription["Axis"]["Y"] = 'AttendancesFaults'; - - $data_set->SetAbsciseLabelSerie("Usuario"); // $this->DataDescription["Position"] = "Usuario"; - - - - - // prepare cache for saving image - $graph_id = $this->user_id.'StudentEvaluationGraph'; // the graph id - $cache = new pCache(); - - $data = $data_set->GetData(); // return $this->DataDescription - - if ($cache->IsInCache($graph_id, $data_set->GetData())) { - //if we already created the img - $img_file = $cache->GetHash($graph_id, $data_set->GetData()); // image file with hash - } else { - - - // Initializing the graph - $test = new pChart(365,300); // Create transparent image 365x300 - - // $this->FontName = api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf' - // $this->FontSize = 8 - $test->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf',8); - - - - $X1 = 50; - $Y1 = 30; - $X2 = 345; - $Y2 = 200; - - //$this->GArea_X1 = $X1;$this->GArea_Y1 = $Y1;$this->GArea_X2 = $X2;$this->GArea_Y2 = $Y2; - $test->setGraphArea(50,30,345,200); - - - $test->drawFilledRoundedRectangle(7,7,371,240,5,240,240,240); - - $test->drawRoundedRectangle(5,5,373,225,5,230,230,230); - - $test->drawGraphArea(255,255,255,TRUE); - - - $test->setFixedScale(0,100,5); - - $test->drawScale($data_set->GetData(),$data_set->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,10,TRUE); - - - $test->drawGrid(4,TRUE,230,230,230,50); - - // Drawing bars - //$test->drawBarGraph($data_set->GetData(),$data_set->GetDataDescription(),TRUE); - //$test->drawLimitsGraph($data_set->GetData(),$data_set->GetDataDescription(),240,240,240); - //$test->drawOverlayBarGraph($data_set->GetData(),$data_set->GetDataDescription()); - - $test->drawHorizontalBarGraph($data_set->GetData(),$data_set->GetDataDescription(),TRUE); - - - // Drawing title - $test->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf',10); - $test->drawTitle(50,22,get_lang('AttendancesFaults'),50,50,50,385); - - - $test->writeValues($data_set->GetData(),$data_set->GetDataDescription(),"Promedio"); - - - - $cache->WriteToCache($graph_id, $data_set->GetData(), $test); - ob_start(); - $test->Stroke(); - ob_end_clean(); - $img_file = $cache->GetHash($graph_id, $data_set->GetData()); - - } - - if (!empty($img_file)) { - $graph = ''; - } - } else { - $graph = '

'.api_convert_encoding(get_lang('GraphicNotAvailable'),'UTF-8').'

'; - } - */ + } return $graph; } diff --git a/plugin/dashboard/block_teacher_graph/block_teacher_graph.class.php b/plugin/dashboard/block_teacher_graph/block_teacher_graph.class.php index dfade4f5b7..b993ba6cdb 100755 --- a/plugin/dashboard/block_teacher_graph/block_teacher_graph.class.php +++ b/plugin/dashboard/block_teacher_graph/block_teacher_graph.class.php @@ -103,28 +103,11 @@ class BlockTeacherGraph extends Block { * @return string content html */ public function get_teachers_information_graph() { - + $teachers = $this->teachers; $graph = ''; - // get data - $time_on_the_platform = array(); - foreach ($teachers as $teacher) { - $teacher_id = $teacher['user_id']; - // get time on platform last week - $time_on_platform_last_week = Tracking :: get_time_spent_on_the_platform($teacher_id,true); - if (!empty($time_on_platform_last_week)) { - $time_on_the_platform[$teacher_id] = $time_on_platform_last_week; - } else { - $time_on_the_platform[$teacher_id] = 0; - } - } - - arsort($time_on_the_platform); - // get only until five users - if (count($time_on_the_platform) > 5) { array_splice($time_on_the_platform,5); } - - $user_ids = array_keys($time_on_the_platform); + $user_ids = array_keys($teachers); $a_last_week = get_last_week(); if (is_array($user_ids) && count($user_ids) > 0) { @@ -132,22 +115,18 @@ class BlockTeacherGraph extends Block { foreach ($user_ids as $user_id) { $teacher_info = api_get_user_info($user_id); $username = $teacher_info['username']; - $time_by_days = array(); - foreach ($a_last_week as $day) { + foreach ($a_last_week as $day) { $time_on_platform_by_day = Tracking::get_time_spent_on_the_platform($user_id, false, $day); $hours = floor($time_on_platform_by_day / 3600); $min = floor(($time_on_platform_by_day - ($hours * 3600)) / 60); $time_by_days[] = $min; } - $data_set->AddPoint($time_by_days,$username); $data_set->AddSerie($username); - } $last_week = date('Y-m-d',$a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]); - $days_on_week = array(); foreach ($a_last_week as $weekday) { $days_on_week[] = date('d/m',$weekday); @@ -170,11 +149,11 @@ class BlockTeacherGraph extends Block { } else { // Initializing the graph - $test = new pChart(400,280); + $test = new pChart(400,330); $test->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf',8); - $test->setGraphArea(65,30,350,200); - $test->drawFilledRoundedRectangle(7,7,393,253,5,240,240,240); - $test->drawRoundedRectangle(5,5,395,255,5,230,230,230); + $test->setGraphArea(65,30,350,250); + $test->drawFilledRoundedRectangle(7,7,393,303,5,240,240,240); + $test->drawRoundedRectangle(5,5,395,305,5,230,230,230); $test->drawGraphArea(255,255,255,TRUE); $test->drawScale($data_set->GetData(),$data_set->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,2,TRUE); $test->drawGrid(4,TRUE,230,230,230,50); @@ -186,30 +165,24 @@ class BlockTeacherGraph extends Block { // Drawing Legend $test->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf',8); $test->drawLegend(320,20,$data_set->GetDataDescription(),204,204,255); - - // Drawing title - //$test->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf',10); - //$test->drawTitle(50,22,get_lang('TimeSpentOnThePlatformLastWeekByDay'),50,50,50,385); - - $test->writeValues($data_set->GetData(),$data_set->GetDataDescription(),"Days"); - + + $test->writeValues($data_set->GetData(),$data_set->GetDataDescription(),array("Days")); + $cache->WriteToCache($graph_id, $data_set->GetData(), $test); ob_start(); $test->Stroke(); ob_end_clean(); $img_file = $cache->GetHash($graph_id, $data_set->GetData()); - } - + } if (!empty($img_file)) { $graph = ''; } } else { $graph = '

'.api_convert_encoding(get_lang('GraphicNotAvailable'),'UTF-8').'

'; - } - - return $graph; - + } + return $graph; + }