From 8f0ac0dd781352b5f9d973eed780ea35a888e693 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Fri, 1 Jul 2016 11:52:54 -0500 Subject: [PATCH 1/3] Update language terms --- .../Schema/V111/Version20160701110000.php | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 app/Migrations/Schema/V111/Version20160701110000.php diff --git a/app/Migrations/Schema/V111/Version20160701110000.php b/app/Migrations/Schema/V111/Version20160701110000.php new file mode 100644 index 0000000000..d51ad94dfa --- /dev/null +++ b/app/Migrations/Schema/V111/Version20160701110000.php @@ -0,0 +1,47 @@ +connection + ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'dokeos_chapter'"); + $this + ->connection + ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'dokeos_module'"); + $this + ->connection + ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'chapter'"); + $this + ->connection + ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'module'"); + } + + /** + * @param Schema $schema + * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Schema\SchemaException + */ + public function down(Schema $schema) + { + + } +} \ No newline at end of file From 7ed318246ee9a194dc62ccd8d23b5cd3cfc5be3f Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Fri, 1 Jul 2016 11:53:04 -0500 Subject: [PATCH 2/3] Update language terms --- main/lang/english/trad4all.inc.php | 9 ++++- main/lang/french/trad4all.inc.php | 51 ++++++++++++++++++++++++++++ main/lang/spanish/trad4all.inc.php | 53 +++++++++++++++++++++++++++++- 3 files changed, 111 insertions(+), 2 deletions(-) diff --git a/main/lang/english/trad4all.inc.php b/main/lang/english/trad4all.inc.php index 8efe7ae5f8..c8d768aa4f 100644 --- a/main/lang/english/trad4all.inc.php +++ b/main/lang/english/trad4all.inc.php @@ -7804,4 +7804,11 @@ $SrcEmail = "Email"; $SrcPhone = "Phone"; $SrcPresential = "Presential"; $TicketXCreated = "Ticket %s created"; -?> +$ShowLinkTicketNotificationTitle = "Show ticket creation link"; +$ShowLinkTicketNotificationComment = "Show the ticket creation link to users on the right side of the portal"; +$LastSentWorkDate = "Last sent work date"; +$SSOSubclassTitle = "Single Sign On sub-class"; +$SSOSubclassComment = "To enable a Single Sign On method, you will have to create your own sub-class in main/auth/sso/ based on the default class. Indicate here the name of the sub-class. For example, if the file is sso.Drupal.class.php, indicate 'Drupal' in this field."; +$CourseCreationSplashScreenTitle = "Course creation splash screen"; +$CourseCreationSplashScreenComment = "The course splash screen show a series of suggested options to the teacher when creating a new course. Disable it to let your teachers land directly on the course homepage."; +?> \ No newline at end of file diff --git a/main/lang/french/trad4all.inc.php b/main/lang/french/trad4all.inc.php index 5ad59d3db4..3a4d612bbd 100644 --- a/main/lang/french/trad4all.inc.php +++ b/main/lang/french/trad4all.inc.php @@ -2496,6 +2496,7 @@ $TitleManipulateStudentPublication = "Éditer ce document"; $EnterDataNewChapter = "Saisissez les informations de ce nouveau chapitre"; $EnterDataNewModule = "Saisissez les informations de ce nouveau chapitre"; $CreateNewStep = "Créer une nouvelle étape :"; +$TicketUpdated = "Ticket mis à jour"; $UseAnExistingResource = "Ou utiliser une ressource existante :"; $Position = "Position"; $NewChapterCreated = "Le nouveau chapitre a bien été créé. Vous pouvez maintenant ajouter un nouveau chapitre ou une nouvelle étape dans celui-ci."; @@ -7697,6 +7698,7 @@ $Translation = "Traduction"; $IfThisTranslationExistsThisWillReplaceTheTerm = "Si ce terme a déjà été traduit, cette opération remplacera la traduction existante pour ce sous-langage."; $LastConnection = "Dernière connexion"; $HisProfileIs = "Son profil est"; +$UserXWithLangXRegisteredTheSite = "L'utilisateur %s de langue %s est enregistré sur le portail"; $YouCanAssignATutorInThisLinkX = "Vous pouvez assigner un tuteur à l'adresse suivante: %s"; $UpdateExistingGlossaryTerms = "Mettre à jour les termes existants"; $TermsUpdated = "Termes mis à jour"; @@ -7707,4 +7709,53 @@ $LastWork = "Dernier travail"; $WaitingModeration = "En attente de modération"; $WorksInSessionReport = "Travaux dans le rapport de session"; $Files = "Fichiers"; +$AssignedTo = "Assigné à"; +$UpdatedByX = "Mis à jour par %s"; +$AssignedChangeFromXToY = "L'utilisateur responsable a été changé de %s à %s"; +$RequestConfirmation = "Demande de confirmation"; +$ChangeAssign = "Changer l'assignation"; +$ToBeAssigned = "À assigner"; +$StatusNew = "Nouveau"; +$StatusPending = "En attente"; +$StatusUnconfirmed = "Non confirmé"; +$StatusClose = "Fermé"; +$StatusForwarded = "Transféré"; +$MyTickets = "Mes tickets"; +$PriorityNormal = "Normale"; +$PriorityHigh = "Élevée"; +$PriorityLow = "Basse"; +$TicketDetail = "Détails du ticket"; +$StatusAll = "Tous"; +$StatusUnread = "Non lu"; +$StatusRead = "Lu"; +$Projects = "Projets"; +$AssignUser = "Assigner utilisateur"; +$TicketEnrollment = "Inscription"; +$TicketGeneralInformation = "Information générale"; +$TicketRequestAndPapework = "Requêtes et formalités"; +$TicketAcademicIncidence = "Incidents académiques"; +$TicketVirtualCampus = "Campus virtuel"; +$TicketOnlineEvaluation = "Évaluation en ligne"; +$TicketsAboutEnrollment = "Tickets de procédure d'inscription"; +$TicketsAboutGeneralInformation = "Tickets au sujet de l'information générale"; +$TicketsAboutRequestAndPapework = "Tickets au sujet des requêtes et formalités"; +$TicketsAboutAcademicIncidence = "Tickets au sujet des incidents académiques comme les examens, travaux pratiques, devoirs, etc."; +$TicketsAboutVirtualCampus = "Tickets au sujet du campus virtuel"; +$TicketsAboutOnlineEvaluation = "Tickets au sujet de l'évaluation en ligne"; +$Assign = "Assigner"; +$PersonalEmail = "E-mail personnel"; +$Priority = "Priorité"; +$Source = "Source"; +$SrcPlatform = "Plate-forme"; +$SrcEmail = "E-mail"; +$SrcPhone = "Téléphone"; +$SrcPresential = "Présentiel"; +$TicketXCreated = "Ticket %s créé"; +$ShowLinkTicketNotificationTitle = "Lien de création de tickets"; +$ShowLinkTicketNotificationComment = "Afficher le lien de création de tickets sur le côté du portail."; +$LastSentWorkDate = "Date de dernier travail envoyé"; +$SSOSubclassTitle = "Single Sign On: Sous-classe"; +$SSOSubclassComment = "Pour activer une méthode de Single Sign On, vous devrez créer une sous-classe dans main/auth/sso/ basée sur la classe par défaut. Indiquez ici le nom de la sous-classe. Par exemple, si le fichier se nomme sso.Drupal.class.php, indiquez 'Drupal' dans ce champ."; +$CourseCreationSplashScreenTitle = "Écran d'accueil de création de cours"; +$CourseCreationSplashScreenComment = "L'écran d'accueil de création de cours montre une série d'options suggérées à l'enseignant lorsqu'il vient de créer un nouveau cours. Désactivez cette option si vous souhaitez envoyer directement les enseignants sur la page principale du cours."; ?> \ No newline at end of file diff --git a/main/lang/spanish/trad4all.inc.php b/main/lang/spanish/trad4all.inc.php index c7c41a138d..8c61c55ca1 100644 --- a/main/lang/spanish/trad4all.inc.php +++ b/main/lang/spanish/trad4all.inc.php @@ -2503,6 +2503,7 @@ $TitleManipulateStudentPublication = "Modificar la tarea actual"; $EnterDataNewChapter = "Introduzca los datos de la sección"; $EnterDataNewModule = "Introduzca los datos de la sección"; $CreateNewStep = "Crear un documento :"; +$TicketUpdated = "Ticket actualizado"; $UseAnExistingResource = "O usar un recurso ya existente :"; $Position = "Posición"; $NewChapterCreated = "La sección ha sido creada. Ahora puede incorporarle objetos de aprendizaje o crear otra sección"; @@ -3656,7 +3657,7 @@ $Photo = "Foto"; $MoveFile = "Mover el archivo"; $Filter = "Filtrar"; $Subject = "Asunto"; -$Message = "mensaje"; +$Message = "Mensaje"; $MoreInformation = "Mas información"; $MakeInvisible = "Ocultar"; $MakeVisible = "Hacer visible"; @@ -7769,6 +7770,7 @@ $Translation = "Traducción"; $IfThisTranslationExistsThisWillReplaceTheTerm = "Si este término ha sido traducido anteriormente, esta operación remplazará su traducción para este sub-idioma."; $LastConnection = "Última conexión"; $HisProfileIs = "Su perfil es"; +$UserXWithLangXRegisteredTheSite = "El usuario %s con idioma %s está registrado en el portal"; $YouCanAssignATutorInThisLinkX = "Puede asignar un tutor siguiendo este enlace: %s"; $UpdateExistingGlossaryTerms = "Actualizar términos existentes"; $TermsUpdated = "Términos actualizados"; @@ -7779,4 +7781,53 @@ $LastWork = "Última tarea"; $WaitingModeration = "Esperando moderación"; $WorksInSessionReport = "Tareas en reporte de sesión"; $Files = "Archivos"; +$AssignedTo = "Asignado a"; +$UpdatedByX = "Actualizado por %s"; +$AssignedChangeFromXToY = "El usuario asignado cambió de %s a %s"; +$RequestConfirmation = "Solicitud de confirmación"; +$ChangeAssign = "Cambiar asignación"; +$ToBeAssigned = "Para ser asignado"; +$StatusNew = "Nuevo"; +$StatusPending = "Pendiente"; +$StatusUnconfirmed = "Sin confirmar"; +$StatusClose = "Cerrado"; +$StatusForwarded = "Reenviado"; +$MyTickets = "Mis tickets"; +$PriorityNormal = "Normal"; +$PriorityHigh = "Alta"; +$PriorityLow = "Baja"; +$TicketDetail = "Detalles del ticket"; +$StatusAll = "Todo"; +$StatusUnread = "No leído"; +$StatusRead = "Leído"; +$Projects = "Proyectos"; +$AssignUser = "Asignar usuario"; +$TicketEnrollment = "Inscripción"; +$TicketGeneralInformation = "Información general"; +$TicketRequestAndPapework = "Solicitudes y trámites"; +$TicketAcademicIncidence = "Incidentes académicos"; +$TicketVirtualCampus = "Campus virtual"; +$TicketOnlineEvaluation = "Evaluación en línea"; +$TicketsAboutEnrollment = "Tickets sobre inscripciones"; +$TicketsAboutGeneralInformation = "Tickets sobre información general"; +$TicketsAboutRequestAndPapework = "Tickets sobre solicitudes y trámites"; +$TicketsAboutAcademicIncidence = "Tickets sobre incidentes académicos, como exámenes, prácticas, tareas, etc."; +$TicketsAboutVirtualCampus = "Tickets sobre el campus virtual"; +$TicketsAboutOnlineEvaluation = "Tickets sobre evaluaciones en línea"; +$Assign = "Asignar"; +$PersonalEmail = "Correo electrónico personal"; +$Priority = "Prioridad"; +$Source = "Fuente"; +$SrcPlatform = "Plataforma"; +$SrcEmail = "Correo electrónico"; +$SrcPhone = "Teléfono"; +$SrcPresential = "Presencial"; +$TicketXCreated = "Ticket %s creado"; +$ShowLinkTicketNotificationTitle = "Enlace de creación de ticket"; +$ShowLinkTicketNotificationComment = "Mostrar el enlace de creación de ticket en la parte lateral del portal."; +$LastSentWorkDate = "Fecha de última tarea enviada"; +$SSOSubclassTitle = "Single Sign On: sub-clase"; +$SSOSubclassComment = "Para activar algun método de Single Sign On, es necesario definir su propia sub-clase en main/auth/sso/, basada en la clase por defecto. Indique aquí el nombre de la sub-clase. Por ejemplo, si el archivo se llama sso.Drupal.class.php, indique 'Drupal' en este campo."; +$CourseCreationSplashScreenTitle = "Pantalla de bienvenida de curso"; +$CourseCreationSplashScreenComment = "La pantalla de bienvenida muestra una serie de sugerencias al profesor cuando acaba de crear un nuevo curso. Deactive esta opción para que el profesor llegue directamente a la pantalla principal del curso."; ?> \ No newline at end of file From 53f2ed29a06646a070c223c31890d820463be1f1 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Fri, 1 Jul 2016 11:54:13 -0500 Subject: [PATCH 3/3] Add option to hide the course creation splash screen - refs CT#8312 --- .../Schema/V111/Version20160701110000.php | 24 +++++++------------ main/create_course/add_course.php | 19 ++++++++++----- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/app/Migrations/Schema/V111/Version20160701110000.php b/app/Migrations/Schema/V111/Version20160701110000.php index d51ad94dfa..9c7561809e 100644 --- a/app/Migrations/Schema/V111/Version20160701110000.php +++ b/app/Migrations/Schema/V111/Version20160701110000.php @@ -8,11 +8,11 @@ use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Types\Type; /** - * Class Version20160628220000 - * Integrate the Skype plugin and create new settings current to enable it + * Class Version20160701110000 + * Add option to remove splash screen on course creation * @package Application\Migrations\Schema\V111 */ -class Version20160628220000 extends AbstractMigrationChamilo +class Version20160701110000 extends AbstractMigrationChamilo { /** * @param Schema $schema @@ -21,18 +21,9 @@ class Version20160628220000 extends AbstractMigrationChamilo */ public function up(Schema $schema) { - $this - ->connection - ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'dokeos_chapter'"); - $this - ->connection - ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'dokeos_module'"); - $this - ->connection - ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'chapter'"); - $this - ->connection - ->executeQuery("UPDATE c_lp_item SET item_type = 'dir' WHERE item_type = 'module'"); + $this->addSql("INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('course_creation_splash_screen',NULL,'radio','Course','true','CourseCreationSplashScreenTitle','CourseCreationSplashScreenComment','',NULL, 1)"); + $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('course_creation_splash_screen','true','Yes') "); + $this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('course_creation_splash_screen','false','No') "); } /** @@ -42,6 +33,7 @@ class Version20160628220000 extends AbstractMigrationChamilo */ public function down(Schema $schema) { - + $this->addSql("DELETE FROM settings_current WHERE variable = 'course_creation_splash_screen'"); + $this->addSql("DELETE FROM settings_options WHERE variable = 'course_creation_splash_screen'"); } } \ No newline at end of file diff --git a/main/create_course/add_course.php b/main/create_course/add_course.php index dd738129b1..65cd4830e4 100755 --- a/main/create_course/add_course.php +++ b/main/create_course/add_course.php @@ -309,12 +309,19 @@ if ($form->validate()) { $add_course_tpl = $tpl->get_template('create_course/add_course.tpl'); $message = $tpl->fetch($add_course_tpl);*/ - - $url = api_get_path(WEB_CODE_PATH); - $url .= 'course_info/start.php?'.api_get_cidreq_params($course_info['code']); - $url .= '&first=1'; - header('Location: ' . $url); - exit; + $splash = api_get_setting('course_creation_splash_screen'); + if ($splash === 'true') { + $url = api_get_path(WEB_CODE_PATH); + $url .= 'course_info/start.php?' . api_get_cidreq_params($course_info['code']); + $url .= '&first=1'; + header('Location: ' . $url); + exit; + } else { + + $url = api_get_path(WEB_COURSE_PATH) . $course_info['directory'] . '/'; + header('Location: ' . $url); + exit; + } } else { $message = Display::return_message( get_lang('CourseCreationFailed'),