Commit 2350814b authored by mathieso's avatar mathieso

Various bugs.

parent f499d8b5
......@@ -398,7 +398,7 @@ display:
expose:
label: ''
plugin_id: standard
title: 'Badges administration'
title: Badges
header:
area_text_custom:
id: area_text_custom
......
......@@ -82,10 +82,26 @@ display:
description: ''
columns:
title: title
field_challenge: field_challenge
title_1: title_1
field_where_referenced: field_where_referenced
field_order_in_book: field_order_in_book
info:
title:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
field_challenge:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
title_1:
sortable: true
default_sort_order: asc
align: ''
......
......@@ -92,6 +92,7 @@ display:
summary: ''
description: ''
columns:
counter: counter
field_internal_name: field_internal_name
body: body
title: title
......@@ -101,7 +102,16 @@ display:
changed: changed
status: status
edit_node: edit_node
nid: nid
title_1: title_1
info:
counter:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
field_internal_name:
sortable: false
default_sort_order: asc
......@@ -163,6 +173,20 @@ display:
separator: ''
empty_column: false
responsive: ''
nid:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
title_1:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
default: title
empty_table: false
row:
......@@ -786,137 +810,6 @@ display:
absolute: false
entity_type: node
plugin_id: entity_link_edit
nid:
id: nid
table: node_field_data
field: nid
relationship: field_rubric_items
group_type: group
admin_label: ''
label: 'RI ID'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: node
entity_field: nid
plugin_id: field
title_1:
id: title_1
table: node_field_data
field: title
relationship: field_rubric_items
group_type: group
admin_label: ''
label: 'RI Title'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: string
settings:
link_to_entity: true
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: node
entity_field: title
plugin_id: field
filters:
type:
id: type
......
......@@ -402,22 +402,7 @@ display:
expose:
operator_limit_selection: false
operator_list: { }
sorts:
created:
id: created
table: node_field_data
field: created
order: DESC
entity_type: node
entity_field: created
plugin_id: date
relationship: none
group_type: group
admin_label: ''
exposed: false
expose:
label: ''
granularity: second
sorts: { }
title: 'Pattern catalog'
header:
area_text_custom:
......
......@@ -6,6 +6,12 @@ div.skilling-book-container ul {
list-style-type:none;
padding-left: 1rem;
}
div.skilling-book-container ul.first-layer {
/*list-style-type:none;*/
padding-left: 0;
}
/* Link to lesson, no children. */
div.skilling-book-container li.no-submenu {
/* color: magenta; */
......
......@@ -275,13 +275,15 @@
return;
}
// Work out date for day.
let displayDay = day;
if (day === 0) {
displayDay = "";
displayDate = "";
}
else {
displayDate = getDisplayDateForDay(day);
}
const displayMaxSubs = maxSubs === null ? "" : maxSubs;
const displayMaxSubs = (maxSubs === null || maxSubs === 0) ? "" : maxSubs;
let result = `
<tr
data-exercise-id="${exerciseId}"
......@@ -294,7 +296,7 @@
<td class="exercise-name">${exerciseName}</td>
<td class="exercise-required">${displayRequired}</td>
<td class="max-subs">${displayMaxSubs}</td>
<td class="day">${day}</td>
<td class="day">${displayDay}</td>
<td class="display-date">${displayDate}</td>
<td><button type="button" class="btn btn-primary btn-sm add-below" title="Add a new row below this one">+</button></td>
</tr>
......@@ -355,6 +357,9 @@
let rowExercise = $activeRow.data(EXERCISE_ID_KEY);
let rowRequired = $activeRow.data(REQUIRED_KEY);
let rowMaxSubs = $activeRow.data(MAX_SUBS_KEY);
if (rowMaxSubs == 0) {
rowMaxSubs = "";
}
let rowDay = $activeRow.data(DAY_KEY);
// console.log("switchActiveRow switching exer: " + rowExercise + " day: " + rowDay);
$activeRow.addClass("table-active");
......@@ -574,11 +579,19 @@
$("#skilling-calendar-tbody tr").each(function(index, row) {
let exerciseId = parseInt($(row).data(EXERCISE_ID_KEY));
let day = parseInt($(row).data(DAY_KEY));
let required = $(row).data(REQUIRED_KEY);
let maxSubs = $(row).data(MAX_SUBS_KEY);
if (maxSubs === "") {
maxSubs = 0;
}
// console.log(day);
// Skip MT rows.
if (exerciseId > 0) {
events.push({
exerciseId: exerciseId,
day: day
day: day,
required: required,
maxSubs: maxSubs
});
}
});
......
This diff is collapsed.
......@@ -16,16 +16,83 @@ Starter content
- class - start date MT
- description text format not selected.
- same for notes
- where referenced for exercises and things not set.
# Sidebars
? Make left wider, or reduce text size, or something.
# Perms
Rewrite entity/field access, use members of class to keep track
of viewing and viewed user.
Replace with field perms module? Or something custom, that can be managed through a GUI?
# Things
After session open for student1
Notice: Undefined index: base in Drupal\views\Plugin\views\query\QueryPluginBase->getEntityTableInfo() (line 292 of /home/kieran/subdomains/s2/web/core/modules/views/src/Plugin/views/query/QueryPluginBase.php) #0 /home/kieran/subdomains/s2/web/core/includes/bootstrap.inc(600): _drupal_error_handler_real(8, 'Undefined index...', '/home/kieran/su...', 292, Array) #1 /home/kieran/subdomains/s2/web/core/modules/views/src/Plugin/views/query/QueryPluginBase.php(292): _drupal_error_handler(8, 'Undefined index...', '/home/kieran/su...', 292, Array) #2
InvalidArgumentException: Field field_badges_awarded is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 587 of /home/kieran/subdomains/s2/web/core/lib/Drupal/Core/Entity/ContentEntityBase.php).
Notice: Undefined index: type in Drupal\field_ui\Form\EntityDisplayFormBase->buildFieldRow() (line 367 of /home/kieran/subdomains/s2/web/core/modules/field_ui/src/Form/EntityDisplayFormBase.php) #0 /home/kieran/subdomains/s2/web/core/includes/bootstrap.inc(600): _drupal_error_handler_real(8, 'Undefined index...', '/home/kieran/su...', 367, Array) #1 /home/kieran/subdomains/s2/web/core/modules/field_ui/src/Form/EntityDisplayFormBase.php(367): _drupal_error_handler(8, 'Undefined index...', '/home/kieran/su...', 367, Array)
# Lessons list
x For anon, Add lesson link in lessons list.
x Add summary to report? Below title.
# Exercise
"Body" title shows for some reason on node display.
- part of installation missing things.
# Embedded reflection for anon
X "(If you were logged..." - italic, get rid of )
# View student account
Member for... out of order.
-SAME THING
x Show portfolio - label to left.
About field not showing on student account view.
# Form
? About field - remove about text format
? Remove body p thing at the bottom
# Exercises list
? Sort by title
# Exerc
# Pattern list
x Sort by name? Screenshot
# Badges
Hide in menu if there are none.
? Hide in menu if there are none.
Hide block if there are none.
X Hide block if there are none.
# Help
Help menu? What to do with it?
X Help menu? What to do with it?
# Skilling config
......@@ -49,19 +116,25 @@ Instructor can show history for student.
Students can see own history
# Hiding menu items for things that dinna exist
Use client side.
# Exercises and f/b
Seeing labels for exercise view.
Test when exercise not on timeline, how shows for student when inserted.
Wrong icon for no submissions left. Check screen shot.
? Add multifield for exercises on due, even if just use first one.
# RI interface
# Calendar
New row, initialize max subs to blank, not zero
X New row, initialize max subs to blank, not zero
Hit sort, max subs goes to undefined.
x Hit sort, max subs goes to undefined.
......
......@@ -6,13 +6,13 @@
# The module skilling_users is for installing user-related config.
user.settings.yml uo
core.entity_form_display.user.user.default.yml
core.entity_form_mode.user.register.yml
core.entity_view_display.user.user.compact.yml
core.entity_view_display.user.user.default.yml
core.entity_view_mode.user.compact.yml
core.entity_view_mode.user.full.yml
core.entity_view_mode.user.token.yml
core.entity_form_display.user.user.default.yml uo
core.entity_form_mode.user.register.yml uo
core.entity_view_display.user.user.compact.yml uo
core.entity_view_display.user.user.default.yml uo
core.entity_view_mode.user.compact.yml uo
core.entity_view_mode.user.full.yml uo
core.entity_view_mode.user.token.yml uo
# Field storage for user entity.
......@@ -177,11 +177,6 @@ views.view.history_for_instructor.yml ho
views.view.history_student.yml ho
# system.action.skilling_history_delete_action.yml ho
# CONTENT TYPES
# The skilling_content_types is for creating content types.
......@@ -632,10 +627,10 @@ views.view.suggestions_administration.yml so
views.view.user_details_header_contextual_filter_.yml so
# INPUT FORMAT AND FILTER
filter.format.skilling.yml so
editor.editor.skilling.yml so
filter.format.stripped.yml so
editor.editor.stripped.yml so
filter.format.skilling.yml co
editor.editor.skilling.yml co
filter.format.stripped.yml co
editor.editor.stripped.yml co
# PATHAUTO
pathauto.pattern.basic_page.yml co
......@@ -650,7 +645,6 @@ pathauto.pattern.models.yml co
pathauto.pattern.multiple_choice_question.yml co
pathauto.pattern.pattern.yml co
pathauto.pattern.principle.yml co
pathauto.pattern.rubric_item.yml co
system.action.pathauto_update_alias_node.yml co
system.action.pathauto_update_alias_user.yml co
......
......@@ -46,7 +46,7 @@ function skilling_install() {
->set('roles_profiles.author.private', 'author_private_files')
->save();
// Make help page.
skilling_install_make_help_page();
// skilling_install_make_help_page();
// Make page explaining the completion score emoji.
skilling_install_make_completion_score_explanation_page();
// Make page explaining submission policies.
......
......@@ -144,7 +144,7 @@ skilling.notices:
expanded: true
weight: 100
# Main menu item showing help link.
# Main menu item showing search link.
skilling.search.view_node_search :
title: 'Search'
description: 'Search this website'
......@@ -153,12 +153,12 @@ skilling.search.view_node_search :
weight: 120
# Main menu item showing help link.
skilling.help:
title: 'Help'
description: 'How to use this website'
route_name: skilling.help
menu_name: main
weight: 140
#skilling.help:
# title: 'Help'
# description: 'How to use this website'
# route_name: skilling.help
# menu_name: main
# weight: 140
# Main menu item showing logout.
skilling.logout:
......
......@@ -152,7 +152,7 @@ function skilling_editor_js_settings_alter(array &$settings) {
$skillingSettings['forcePasteAsPlainText'] = TRUE;
// Remove plugins that implement context menu.
// See https://www.drupal.org/project/ckeditor_browser_context_menu
$skillingSettings['removePlugins'] = 'contextmenu,tabletools,tableresize';
$skillingSettings['removePlugins'] = 'contextmenu,tabletools,tableresize,elementspath';
$skillingSettings['disableNativeSpellChecker'] = FALSE;
// Change height of the ckeditor wysiwyg editor.
if (isset($settings['editor']['formats']['skilling'])) {
......@@ -2885,7 +2885,7 @@ function skilling_theme($existing, $type, $theme, $path) {
'container_class' => NULL,
],
],
'reflect' => [
'insert-reflect' => [
'variables' => [
'title' => NULL,
'content' => NULL,
......
......@@ -69,14 +69,14 @@ skilling.notices:
requirements:
_role: 'authenticated'
skilling.help:
path: '/skilling/show-help'
defaults:
_controller: '\Drupal\skilling\Controller\HelpController::showHelp'
_title: 'Help'
requirements:
_permission: 'access content'
#skilling.help:
# path: '/skilling/show-help'
# defaults:
# _controller: '\Drupal\skilling\Controller\HelpController::showHelp'
# _title: 'Help'
# requirements:
# _permission: 'access content'
#
# Routes for the grading system.
skilling.assessment_start_grading:
path: '/skilling/start-grading'
......
......@@ -14,9 +14,9 @@ services:
plugin.manager.skilling.custom_tag:
class: Drupal\skilling\Plugin\SkillingCustomTagManager
parent: default_plugin_manager
# plugin.manager.skilling.custom_token:
# class: Drupal\skilling\Plugin\SkillingCustomTokenManager
# parent: default_plugin_manager
plugin.manager.skilling.custom_token:
class: Drupal\skilling\Plugin\SkillingCustomTokenManager
parent: default_plugin_manager
skilling.nid_bag:
class: Drupal\skilling\NidBag
skilling.twig.extension:
......@@ -38,10 +38,10 @@ services:
skilling.completion_score:
class: Drupal\skilling\CompletionScore
arguments: ['@entity_type.manager', '@skilling.utilities', '@skilling.skilling_user_factory', '@skilling.skilling_current_user', '@skilling.current_class', '@skilling.enrollment', '@messenger']
#Logger channel.
skilling.logger.channel:
parent: logger.channel_base
arguments: ['skilling']
# #Logger channel.
# skilling.logger.channel:
# parent: logger.channel_base
# arguments: ['skilling']
skilling.starter.make_nodes:
class: Drupal\skilling\MakeStarterContent\MakeNodes
arguments: ['@entity_type.manager', '@book.manager', '@skilling.utilities', '@file_system', '@entity_field.manager']
......
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_challenge
- node.type.exercise
id: node.exercise.field_challenge
field_name: field_challenge
entity_type: node
bundle: exercise
label: Challenge
description: 'Is this a challenge exercise?'
required: true
translatable: false
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: 'Yes'
off_label: 'No'
field_type: boolean
......@@ -14,3 +14,5 @@ dependencies:
- drupal:system
- drupal:text
- drupal:user
# Content first
- skilling:skilling_content_types
......@@ -20,134 +20,137 @@ function skilling_users_install() {
// Adjust order of fields on entity display.
// Get the user default view mode.
/* @var \Drupal\Core\Entity\Entity\EntityViewDisplay $entityViewDisplay */
$entityViewDisplay =
\Drupal::entityTypeManager()
->getStorage('entity_view_display')
->load('user.user.default');
if (!$entityViewDisplay) {
// Don't find it when testing. Make it.
$values = array(
'targetEntityType' => 'user',
'bundle' => 'user',
'mode' => 'default',
'status' => TRUE,
);
$entityViewDisplay = \Drupal::entityTypeManager()
->getStorage('entity_view_display')
->create($values);
}
$entityViewDisplay->setComponent('field_first_name', [
'weight' => 5,
'label' => 'inline',
]);
$entityViewDisplay->setComponent('field_last_name', [
'weight' => 10,
'label' => 'inline',
]);
$entityViewDisplay->setComponent('field_initials', [
'weight' => 13,
'label' => 'inline',
]);
$entityViewDisplay->setComponent('user_picture', [
'weight' => 20,
]);
$entityViewDisplay->setComponent('field_show_portfolio', [
'weight' => 25,
]);
$entityViewDisplay->setComponent('field_about', [
'weight' => 30,
]);
$entityViewDisplay->setComponent('field_feedback_greetings', [
'weight' => 40,
]);
$entityViewDisplay->setComponent('field_feedback_summary_good', [
'weight' => 50,
]);
$entityViewDisplay->setComponent('field_feedback_summary_needs_wor', [
'weight' => 60,
]);