Skip to content

Commit

Permalink
Merge branch 'Simon-Initiative:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dtiwarATS committed Mar 7, 2024
2 parents 9de5f44 + 07a4604 commit 2a8eb4b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion assets/src/components/activities/multi_input/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ export interface MultiInputSchema extends ActivityModelSchema, ActivityLevelScor
parts: Part[];
transformations: Transformation[];
previewText: string;
responses?: { user_name: string; text: string; type: string }[];
responses?: { user_name: string; text: string; type: string; part_id: string; count: number }[];
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,19 @@ export const QuestionTab: React.FC<Props> = (props) => {
</tr>
<tbody>
{model.authoring.responses
?.filter((response) => response.type === props.input.inputType)
.map((response, index) => (
<tr key={index}>
<td className="whitespace-nowrap">{response.user_name}</td>
<td>{response.text}</td>
</tr>
))}
?.filter(
(response) =>
response.type === props.input.inputType &&
response.part_id === props.input.partId,
)
.map((response, index) =>
Array.from({ length: response.count }).map((_, i) => (
<tr key={`${index}-${i}`}>
<td className="whitespace-nowrap">{response.user_name}</td>
<td>{response.text}</td>
</tr>
)),
)}
</tbody>
</table>
</div>
Expand Down
2 changes: 1 addition & 1 deletion assets/src/components/parts/janus-text-flow/Markup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const Markup: React.FC<any> = ({
key={key}
className={customCssClass}
href={href}
target={target}
target={target || '_blank'}
style={{ ...renderStyles, display: 'inline' }}
>
{processedText}
Expand Down
10 changes: 9 additions & 1 deletion assets/styles/common/elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,22 @@ $element-margin-bottom: 1.5em;
.callout-inline,
.formula-inline {
display: inline-block;
padding: 2px 0.5em;

mjx-container[display='true'] {
pointer-events: none;
margin: 0px !important;
}
}

.formula-inline {
/* no padding on left and right, some use to mix symbols with surrounding punctuation */
padding: 2px 0em;
}

.callout-inline {
padding: 2px 0.5em;
}

.callout-inline,
.callout {
margin-bottom: $element-margin-bottom;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,9 @@ defmodule OliWeb.Components.Delivery.ScoredActivities do
%{
text: response_summary.response,
user_name: OliWeb.Common.Utils.name(response_summary.user),
type: mapper[response_summary.part_id]
type: mapper[response_summary.part_id],
part_id: response_summary.part_id,
count: response_summary.count
}
| acc_responses
]
Expand Down

0 comments on commit 2a8eb4b

Please sign in to comment.