Skip to content

Commit 9c6c7e6

Browse files
committed
Merge branch 'master' of github.com:chamilo/chamilo-lms
2 parents 010cd8e + 573a610 commit 9c6c7e6

File tree

9 files changed

+50
-21
lines changed

9 files changed

+50
-21
lines changed

public/main/admin/extra_fields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//jqgrid will use this URL to do the selects
3838
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_extra_fields&type='.$extraFieldType;
3939

40-
//The order is important you need to check the the $column variable in the model.ajax.php file
40+
//The order is important you need to check the $column variable in the model.ajax.php file
4141
$columns = $obj->getJqgridColumnNames();
4242

4343
//Column config

public/main/inc/lib/myspace.lib.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,6 @@ public static function generateAdminActionLinks(): array
104104
}
105105
return $actions;
106106
}
107-
/**
108-
* Get admin actions.
109-
*
110-
* @return string
111-
*/
112-
public static function getAdminActions(bool $display = false)
113-
{
114-
$actions = self::generateAdminActionLinks();
115-
return Display::actions($actions);
116-
}
117107

118108
/**
119109
* @return string

public/main/my_space/survey_report.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@
3636
echo '<div class="actions">';
3737
echo MySpace::getTopMenu();
3838
echo '</div>';
39-
echo MySpace::getAdminActions();
39+
$actions = MySpace::generateAdminActionLinks();
40+
41+
echo '<ul class="list-disc m-y-2">';
42+
foreach ($actions as $action) {
43+
echo '<li><a href="'.$action['url'].'">'.$action['content'].'</a></li>'.PHP_EOL;
44+
}
45+
echo '</ul>';
4046

4147
$form->display();
4248

public/main/my_space/tc_report.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ function(response) {
8888
echo '<div class="actions">';
8989
echo MySpace::getTopMenu();
9090
echo '</div>';
91-
echo MySpace::getAdminActions();
91+
$actions = MySpace::generateAdminActionLinks();
92+
93+
echo '<ul class="list-disc m-y-2">';
94+
foreach ($actions as $action) {
95+
echo '<li><a href="'.$action['url'].'">'.$action['content'].'</a></li>'.PHP_EOL;
96+
}
97+
echo '</ul>';
9298

9399
if ('add_user' !== $action) {
94100
$form = new FormValidator('language_filter');

public/main/my_space/ti_report.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@
3333
echo '<div class="actions">';
3434
echo MySpace::getTopMenu();
3535
echo '</div>';
36-
echo MySpace::getAdminActions();
36+
$actions = MySpace::generateAdminActionLinks();
37+
38+
echo '<ul class="list-disc m-y-2">';
39+
foreach ($actions as $action) {
40+
echo '<li><a href="'.$action['url'].'">'.$action['content'].'</a></li>'.PHP_EOL;
41+
}
42+
echo '</ul>';
3743

3844
echo '<style>
3945
.session_block {

public/main/tracking/course_session_report.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@
7474
echo '</div>';
7575

7676
if (api_is_platform_admin()) {
77-
echo MySpace::getAdminActions();
77+
$actions = MySpace::generateAdminActionLinks();
78+
79+
echo '<ul class="list-disc m-y-2">';
80+
foreach ($actions as $action) {
81+
echo '<li><a href="'.$action['url'].'">'.$action['content'].'</a></li>'.PHP_EOL;
82+
}
83+
echo '</ul>';
7884
}
7985

8086
echo '<h2>'.get_lang('Results of learning paths exercises by session').'</h2>';

public/main/tracking/question_course_report.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,13 @@ function load_courses() {
154154
echo '</div>';
155155

156156
if (api_is_platform_admin()) {
157-
echo MySpace::getAdminActions();
157+
$actions = MySpace::generateAdminActionLinks();
158+
159+
echo '<ul class="list-disc m-y-2">';
160+
foreach ($actions as $action) {
161+
echo '<li><a href="'.$action['url'].'">'.$action['content'].'</a></li>'.PHP_EOL;
162+
}
163+
echo '</ul>';
158164
}
159165
echo '<br />';
160166
echo '<h2>'.get_lang('Learning paths exercises results list').'</h2>';

src/CoreBundle/Form/ProfileType.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
8181
$fieldsMap = [
8282
'firstname' => ['field' => 'firstname', 'type' => TextType::class, 'label' => 'Firstname'],
8383
'lastname' => ['field' => 'lastname', 'type' => TextType::class, 'label' => 'Lastname'],
84-
'officialcode' => ['field' => 'official_code', 'type' => TextType::class, 'label' => 'Official Code'],
85-
'email' => ['field' => 'email', 'type' => EmailType::class, 'label' => 'Email'],
84+
'officialcode' => ['field' => 'official_code', 'type' => TextType::class, 'label' => 'Official code'],
85+
'email' => ['field' => 'email', 'type' => EmailType::class, 'label' => 'E-mail'],
8686
'picture' => ['field' => 'illustration', 'type' => IllustrationType::class, 'label' => 'Picture', 'mapped' => false],
87-
'login' => ['field' => 'login', 'type' => TextType::class, 'label' => 'Login'],
87+
'login' => ['field' => 'login', 'type' => TextType::class, 'label' => 'Username'],
8888
'password' => ['field' => 'password', 'type' => PasswordType::class, 'label' => 'Password', 'mapped' => false, 'required' => false],
8989
'language' => [
9090
'field' => 'locale',
@@ -95,8 +95,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
9595
'placeholder' => null,
9696
'choice_translation_domain' => false,
9797
],
98-
'phone' => ['field' => 'phone', 'type' => TextType::class, 'label' => 'Phone Number'],
99-
'theme' => ['field' => 'theme', 'type' => TextType::class, 'label' => 'Theme'],
98+
'phone' => ['field' => 'phone', 'type' => TextType::class, 'label' => 'Phone number'],
99+
'theme' => ['field' => 'theme', 'type' => TextType::class, 'label' => 'Theme (stylesheet)'],
100100

101101
// Core date_of_birth → entity property dateOfBirth
102102
'date_of_birth' => [

tests/scripts/lang/find_missing_terms.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ function extractTermsFromLine(string $line, bool $isVue): array
165165
// trans("term"), ->trans("term"), .trans("term")
166166
preg_match_all('/(?:->|\.)?trans\s*\(\s*(["\'])(.*?)(?<!\\\\)\1\s*\)/x', $line, $matches);
167167
addUnescapedTerms($matches, $terms);
168+
169+
// 'display_text' => 'term',
170+
preg_match_all('/.*\'display_text\'\s\=\>\s(\')(.*?)\'/x', $line, $matches);
171+
addUnescapedTerms($matches, $terms);
168172
}
169173

170174
return $terms;
@@ -194,6 +198,11 @@ function addUnescapedTerms(array $matches, array &$terms): void
194198
} else {
195199
$term = unescape_single($term);
196200
}
201+
$first = substr($term, 0, 1);
202+
$last = substr($term, -1);
203+
if (($first === '"' && $last === '"') || ($first === "'" && $last === "'")) {
204+
$term = substr($term, 1, strlen($term) - 2);
205+
}
197206
$terms[] = $term;
198207
}
199208
}

0 commit comments

Comments
 (0)