@nualang/nualang-ui-components 0.1.1191 → 0.1.1192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = FeedbackInfo;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _material = require("@mui/material");
9
- var _theme = require("../../../../.storybook/theme");
10
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
10
  const getModeConditionalBackground = (dark, light) => theme => ({
12
11
  backgroundColor: theme.palette.mode === "dark" ? dark // Using MUI's palette
@@ -654,6 +654,8 @@ function Classroom({
654
654
  visibility,
655
655
  enrolmentKey
656
656
  } = classroom;
657
+ const classroomCourses = classroom?.courses || [];
658
+ const courseIds = classroomCourses.toString();
657
659
  const isArchived = visibility === "archived";
658
660
  const handleJoin = () => {
659
661
  if (authenticated) {
@@ -781,6 +783,7 @@ function Classroom({
781
783
  t: t,
782
784
  courses: courses,
783
785
  members: members,
786
+ courseIds: courseIds,
784
787
  fetchMemberCourseCompletions: fetchMemberCourseCompletions,
785
788
  classroomId: classroomId,
786
789
  memberId: !isCreator && username,
@@ -145,7 +145,8 @@ function Progress({
145
145
  reportFilters,
146
146
  filter,
147
147
  handleFilterChange,
148
- submissions
148
+ submissions,
149
+ courseIds
149
150
  }) {
150
151
  const theme = (0, _styles.useTheme)();
151
152
  const isSmallScreen = (0, _useMediaQuery.default)(theme.breakpoints.down("sm"));
@@ -291,7 +292,6 @@ function Progress({
291
292
  }
292
293
  async function handleDownloadAsExcelXlsxOverview(XLSX, workbook, filter) {
293
294
  let overviewSheet = [];
294
- const courseIds = coursesWithSections.map(c => c.courseId).toString();
295
295
  let columnHeadings = [[t("student_progress")]];
296
296
  const courseSheets = {};
297
297
  coursesWithSections.forEach(courseItem => {
@@ -414,6 +414,7 @@ function Progress({
414
414
  setSelectedRoleplay: setSelectedRoleplay,
415
415
  courses: coursesWithSections,
416
416
  members: classroomMembers,
417
+ courseIds: courseIds,
417
418
  fetchMemberCourseCompletions: fetchMemberCourseCompletions,
418
419
  hideSorting: memberId ? true : false,
419
420
  filter: filter,
@@ -474,7 +475,8 @@ function Progress({
474
475
  hideSorting: memberId ? true : false,
475
476
  filter: filter,
476
477
  roleplays: roleplays,
477
- bots: bots
478
+ bots: bots,
479
+ courseIds: courseIds
478
480
  }));
479
481
  }
480
482
  var _default = exports.default = Progress;
@@ -514,12 +514,12 @@ function TableRow({
514
514
  filter,
515
515
  roleplays,
516
516
  bots,
517
- index
517
+ index,
518
+ courseIds
518
519
  }) {
519
520
  const {
520
521
  memberId
521
522
  } = member;
522
- const courseIds = courses.map(c => c.courseId).toString();
523
523
  const {
524
524
  data = {},
525
525
  error,
@@ -694,7 +694,8 @@ function ProgressTable({
694
694
  setSelectedRoleplay,
695
695
  hideSorting,
696
696
  roleplays,
697
- bots
697
+ bots,
698
+ courseIds
698
699
  }) {
699
700
  const exercisesArray = ["translation", "listening", "pronunciation"];
700
701
  const roleplayGames = ["story", "fill_in_blanks", "act_it_out", "act_it_out_listening", "act_it_out_speaking", "act_it_out_listening_speaking"];
@@ -723,7 +724,6 @@ function ProgressTable({
723
724
  a1 = a.username.toLowerCase();
724
725
  b1 = b.username.toLowerCase();
725
726
  } else {
726
- const courseIds = courses.map(c => c.courseId).toString();
727
727
  a.completions = queryClient.getQueryData(["memberCourseProgress", a.memberId, courseIds]);
728
728
  b.completions = queryClient.getQueryData(["memberCourseProgress", b.memberId, courseIds]);
729
729
  if (currentView === "all_courses") {
@@ -1079,7 +1079,8 @@ function ProgressTable({
1079
1079
  filter: filter,
1080
1080
  roleplays: roleplays,
1081
1081
  bots: bots,
1082
- index: i
1082
+ index: i,
1083
+ courseIds: courseIds
1083
1084
  })))));
1084
1085
  }
1085
1086
  var _default = exports.default = ProgressTable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nualang/nualang-ui-components",
3
- "version": "0.1.1191",
3
+ "version": "0.1.1192",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",