Skip to content

Commit 7d4560b

Browse files
Merge pull request #4856 from christianbeeznest/ofaj-20913
Skills: Add css and rename setting to show user skills - refs BT#20913
2 parents 3b578dc + 5b8b6df commit 7d4560b

File tree

4 files changed

+222
-5
lines changed

4 files changed

+222
-5
lines changed

assets/css/app.scss

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,218 @@
210210
margin-left: 20% !important;
211211
}
212212

213+
/* ****************************************************
214+
CSS SKILL
215+
**************************************************** */
216+
#skillList .header-title{
217+
padding: 8px;
218+
border-bottom: 2px solid #ddd;
219+
font-weight: bold;
220+
margin-bottom: 15px;
221+
}
222+
.skills-badges{
223+
display: grid;
224+
grid-gap: 1rem;
225+
grid-row-gap: 16px;
226+
grid-template-columns: repeat(6, 1fr);
227+
}
228+
.skills-badges .item{
229+
display: inline-block;
230+
width: 100%;
231+
text-align: center;
232+
justify-content: center;
233+
align-items: center;
234+
}
235+
.skills-badges a .caption{
236+
text-align: center;
237+
}
238+
.list-horizontal .list-skills{
239+
display: grid;
240+
grid-gap: 1rem;
241+
grid-row-gap: 16px;
242+
grid-template-columns: repeat(4, 1fr);
243+
}
244+
.list-vertical .list-skills{
245+
display: grid;
246+
grid-gap: 1rem;
247+
grid-row-gap: 16px;
248+
grid-template-columns: repeat(2, 1fr);
249+
}
250+
.list-skills .item{
251+
display: inline-block;
252+
width: 100%;
253+
text-align: center;
254+
justify-content: center;
255+
align-items: center;
256+
}
257+
.skill-options .legend {
258+
border: 1px dashed #cccccc;
259+
padding: 1em;
260+
-webkit-border-radius: 10px;
261+
-moz-border-radius: 10px;
262+
border-radius: 10px;
263+
margin-bottom: 1em;
264+
margin-top: 1em;
265+
background-color: #FFFFFF;
266+
}
267+
268+
.skill-options .skill-home {
269+
margin-top: 1em;
270+
margin-bottom: 1em;
271+
}
272+
273+
.skill-options .btn-block {
274+
box-sizing: border-box;
275+
display: block;
276+
padding-left: 0;
277+
padding-right: 0;
278+
width: 100%;
279+
}
280+
281+
.skill-options .accordion-inner {
282+
padding: 9px 15px;
283+
/*border: 1px solid #dadada;*/
284+
background-color: #FFFFFF;
285+
}
286+
287+
.skill-options .load_wheel {
288+
}
289+
290+
.skill-options .skill-winner {
291+
list-style: none;
292+
margin: 0;
293+
padding: 0;
294+
}
295+
296+
.skill-options .skill-winner li {
297+
float: left;
298+
margin-right: 1em;
299+
padding-bottom: 1em;
300+
}
301+
302+
.skill-options .skill-winner li a {
303+
background: url("/main/img/icons/16/winner.png") no-repeat;
304+
padding-left: 1.5em;
305+
padding-bottom: 1em;
306+
}
307+
308+
.search-skill ul.holder li.bit-input input {
309+
width: 100%;
310+
}
311+
312+
.skill-legend-basic {
313+
color: #3A87AD;
314+
}
315+
316+
.skill-legend-add {
317+
color: #F89406;
318+
}
319+
320+
.skill-legend-search {
321+
color: #B94A48;
322+
}
323+
324+
.skill-legend-badges {
325+
color: #31A354;
326+
}
327+
328+
.page-skill .panel-default {
329+
border-color: #DDDDDD;
330+
}
331+
332+
.page-skill .btn-default {
333+
background-color: #F6F6F6;
334+
}
335+
336+
.page-skill .btn-default:hover {
337+
background-color: #E6E6E6;
338+
}
339+
340+
.page-skill #skill_info {
341+
font-size: 12px;
342+
}
343+
344+
.page-skill #skill_wheel tspan {
345+
font-size: 12px;
346+
}
347+
348+
.page-skill .holder_simple li.bit-box a {
349+
color: #8A6D3B;
350+
}
351+
352+
.skill_partition {
353+
cursor: pointer;
354+
stroke: #000000;
355+
stroke-width: 0.5px;
356+
}
357+
358+
.items-user .avatar-user {
359+
text-align: center;
360+
margin-bottom: 10px;
361+
}
362+
363+
.items-user p {
364+
font-size: 12px;
365+
margin-bottom: 5px;
366+
}
367+
368+
.items-user .list-group {
369+
font-size: 12px;
370+
}
371+
372+
table#skill_holder {
373+
margin-top: 15px;
374+
}
375+
376+
.badges-sidebar {
377+
height: 250px;
378+
}
379+
380+
.panel figure figcaption {
381+
background: none;
382+
text-align: center;
383+
}
384+
385+
.skill_root {
386+
box-shadow: 2px 2px 19px #aaa;
387+
border-radius: 6px;
388+
background-color: #ccc;
389+
border: 0.1em dotted #D4E06B;
390+
color: black;
391+
font-size: 0.9em;
392+
height: 4em;
393+
opacity: 0.8;
394+
padding-top: 0.9em;
395+
text-align: center;
396+
width: 120px;
397+
z-index: 40;
398+
position: relative;
399+
}
400+
401+
.skill_child {
402+
box-shadow: 2px 2px 19px #aaa;
403+
border-radius: 6px;
404+
background-color: white;
405+
border: 0.1em dotted #D4E06B;
406+
color: black;
407+
font-size: 0.9em;
408+
height: 4em;
409+
opacity: 0.8;
410+
padding-top: 0.9em;
411+
text-align: center;
412+
width: 120px;
413+
z-index: 40;
414+
float: left;
415+
margin-left: 20px;
416+
margin-bottom: 20px;
417+
margin-top: 10px;
418+
position: relative;
419+
}
420+
421+
/* ****************************************************
422+
END SKILL
423+
**************************************************** */
424+
213425
//@import 'primevue-md-light-indigo/theme.css';
214426
//@import '~primevue/resources/primevue.min.css';
215427
//@import '~primeflex/primeflex.css';

public/main/inc/lib/SkillModel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function processSkillListSimple($skills, $imageSize = 'mini', $style = ''
192192
break;
193193
}
194194

195-
$isHierarchicalTable = ('true' === api_get_setting('skill.table_of_hierarchical_skill_presentation'));
195+
$isHierarchicalTable = ('true' === api_get_setting('skill.skills_hierarchical_view_in_user_tracking'));
196196
$skillRepo = Container::getSkillRepository();
197197
$html = '';
198198
foreach ($skills as $skill) {
@@ -711,7 +711,7 @@ public function getUserSkills($userId, $getSkillData = false, $courseId = 0, $se
711711
*/
712712
public function processVertex(Vertex $vertex, $skills = [], $level = 0)
713713
{
714-
$isHierarchicalTable = ('true' === api_get_setting('skill.table_of_hierarchical_skill_presentation'));
714+
$isHierarchicalTable = ('true' === api_get_setting('skill.skills_hierarchical_view_in_user_tracking'));
715715
$subTable = '';
716716
if ($vertex->getVerticesEdgeTo()->count() > 0) {
717717
if ($isHierarchicalTable) {
@@ -818,7 +818,7 @@ public function getUserSkillsTable($userId, $courseId = 0, $sessionId = 0, $addT
818818
$tableRows[] = $tableRow;
819819
}
820820

821-
$isHierarchicalTable = ('true' === api_get_setting('skill.table_of_hierarchical_skill_presentation'));
821+
$isHierarchicalTable = ('true' === api_get_setting('skill.skills_hierarchical_view_in_user_tracking'));
822822
$allowLevels = api_get_setting('skill.skill_levels_names', true);
823823

824824
$tableResult = '<div id="skillList">';

src/CoreBundle/Migrations/Schema/V200/Version20230216122900.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,11 @@ public function up(Schema $schema): void
503503
}
504504
}
505505

506+
// Rename setting for hierarchical skill presentation.
507+
$this->addSql(
508+
"UPDATE settings_current SET variable = 'skills_hierarchical_view_in_user_tracking', title = 'skills_hierarchical_view_in_user_tracking' WHERE variable = 'table_of_hierarchical_skill_presentation'"
509+
);
510+
506511
// Insert extra fields required.
507512
$result = $connection
508513
->executeQuery(

src/CoreBundle/Settings/SkillSettingsSchema.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function buildSettings(AbstractSettingsBuilder $builder): void
2626
'allow_teacher_access_student_skills' => 'false',
2727
'skills_teachers_can_assign_skills' => 'false',
2828
'hide_skill_levels' => 'false',
29-
'table_of_hierarchical_skill_presentation' => 'false',
29+
'skills_hierarchical_view_in_user_tracking' => 'false',
3030
'skill_levels_names' => '',
3131
'allow_skill_rel_items' => 'false',
3232
]
@@ -49,7 +49,7 @@ public function buildForm(FormBuilderInterface $builder): void
4949
->add('allow_teacher_access_student_skills', YesNoType::class)
5050
->add('skills_teachers_can_assign_skills', YesNoType::class)
5151
->add('hide_skill_levels', YesNoType::class)
52-
->add('table_of_hierarchical_skill_presentation', YesNoType::class)
52+
->add('skills_hierarchical_view_in_user_tracking', YesNoType::class)
5353
->add(
5454
'skill_levels_names',
5555
TextareaType::class,

0 commit comments

Comments
 (0)