diff --git a/i18n/en.ts b/i18n/en.ts index fc4f55ecc4f400c520fe80e99395b31ff1cbb811..624172dd77e121e051113d9e01818f83d100b2c9 100644 --- a/i18n/en.ts +++ b/i18n/en.ts @@ -898,7 +898,11 @@ export const lang_en: LangObj = { "Manage asset files" : "Manage asset files", "Attached Files" : "Attached Files", "All Files": "All Files", - "These are all files where you have access to. For exercises or exercise tests you need permission to change the exercise." : "These are all files where you have access to. For exercises or exercise tests you need permission to change the exercise.", + + "These are all files from custom projects and custom exercise tests." : "These are all files from custom projects and custom exercise tests.", + "These are all files from exercise tests where you have the group permission to change the exercise and the exercise is visible to all." : "These are all files from exercise tests where you have the group permission to change the exercise and the exercise is visible to all.", + "These are all files from exercise descriptions where you have the group permission to change the exercise and the exercise is visible to all." : "These are all files from exercise descriptions where you have the group permission to change the exercise and the exercise is visible to all.", + "Note that when you detach a file and it has no connection to another exercise, it will get deleted!" : "Note that when you detach a file and it has no connection to another exercise then it will get deleted!", "Managing assets is only allowed for saved exercises (not for new exercises)": "Managing assets is only allowed for saved exercises (not for new exercises)", "All changes to assets are applied immediately in the backend (saving is not needed for this)!": "All changes to assets are applied immediately in the backend (saving is not needed for this)!", diff --git a/i18n/i18nRoot.ts b/i18n/i18nRoot.ts index 069fe7cbae9f099a489232194ba9f831d5f77cbf..bb0ab77d334df7a7d7e1f25c876a3b8639dffa5c 100644 --- a/i18n/i18nRoot.ts +++ b/i18n/i18nRoot.ts @@ -903,7 +903,11 @@ export interface LangObj { "Manage asset files": string "Attached Files" : string "All Files": string - "These are all files where you have access to. For exercises or exercise tests you need permission to change the exercise." : string + + "These are all files from custom projects and custom exercise tests." : string + "These are all files from exercise tests where you have the group permission to change the exercise and the exercise is visible to all." : string + "These are all files from exercise descriptions where you have the group permission to change the exercise and the exercise is visible to all." : string + "Note that when you detach a file and it has no connection to another exercise, it will get deleted!": string "Managing assets is only allowed for saved exercises (not for new exercises)": string "All changes to assets are applied immediately in the backend (saving is not needed for this)!": string diff --git a/src/components/sites/doExerciseSite/customTestsPanel/dialog/customTestsDialog/changeCustomTestView.tsx b/src/components/sites/doExerciseSite/customTestsPanel/dialog/customTestsDialog/changeCustomTestView.tsx index fe2d0f18f3ee8bb735231e3ad41a00495348fa64..8b5388967dcf93ec1c8ad80034b0b27050fca477 100644 --- a/src/components/sites/doExerciseSite/customTestsPanel/dialog/customTestsDialog/changeCustomTestView.tsx +++ b/src/components/sites/doExerciseSite/customTestsPanel/dialog/customTestsDialog/changeCustomTestView.tsx @@ -243,6 +243,7 @@ class ChangeCustomTestView extends React.Component<Props, any> { title={getI18n(this.props.langId, "Manage asset files")} isDisplayed={this.props.isAddCustomTestAssetFilesModalDisplayed} isBusy={this.props.isAddCustomTestAssetFilesModalBusy} + filePreviewsListSourcesTooltip={"These are all files from custom projects and custom exercise tests."} uploadPercentage={this.props.addCustomTestAssetFilesModalUploadPercentage} uploadInputId={'do-exercise-custom-test-upload'} diff --git a/src/components/sites/editCustomProjectSite/dialogs/changeTestDialog/changeTestView.tsx b/src/components/sites/editCustomProjectSite/dialogs/changeTestDialog/changeTestView.tsx index 079aa6f822e361912a6943816c7388e1542088ec..8ffb27e3ff86f3f378d34025e108cc3e64c65d8e 100644 --- a/src/components/sites/editCustomProjectSite/dialogs/changeTestDialog/changeTestView.tsx +++ b/src/components/sites/editCustomProjectSite/dialogs/changeTestDialog/changeTestView.tsx @@ -266,6 +266,7 @@ class ChangeTestView extends React.Component<Props, any> { isBusy={this.props.isAddCustomProjectCustomTestAssetFilesModalBusy} uploadPercentage={this.props.addCustomProjectCustomTestAssetFilesModalUploadPercentage} uploadInputId={'custom-project-custom-test-upload'} + filePreviewsListSourcesTooltip={"These are all files from custom projects and custom exercise tests."} onUploadFile={async (file) => { this.props.setIsAddCustomProjectCustomTestAssetFilesModalDisplayed(true, true) diff --git a/src/components/sites/editCustomProjectSite/editCustomProjectSite.tsx b/src/components/sites/editCustomProjectSite/editCustomProjectSite.tsx index 3f083fce55a83f6dd5aa75dad47d01a7b3fe409a..03a34b97a2573b0715c8bd7afcd42a445d79d8fb 100644 --- a/src/components/sites/editCustomProjectSite/editCustomProjectSite.tsx +++ b/src/components/sites/editCustomProjectSite/editCustomProjectSite.tsx @@ -319,6 +319,7 @@ class editCustomProjectSite extends React.Component<Props & RouteComponentProps< isBusy={this.props.isAddCustomProjectAssetFilesModalBusy} uploadPercentage={this.props.addCustomProjectAssetFilesModalUploadPercentage} uploadInputId={'custom-project-description-upload'} + filePreviewsListSourcesTooltip={"These are all files from custom projects and custom exercise tests."} onUploadFile={async (file) => { diff --git a/src/components/sites/exerciseEditorSite/addAssetFilesModal/addAssetFilesModal.tsx b/src/components/sites/exerciseEditorSite/addAssetFilesModal/addAssetFilesModal.tsx index a01739ce1142f6fd8d696fa8bcb2d9d36a3abe21..24116f6009f9e2ced8a98b7a790c2e89e010f1a1 100644 --- a/src/components/sites/exerciseEditorSite/addAssetFilesModal/addAssetFilesModal.tsx +++ b/src/components/sites/exerciseEditorSite/addAssetFilesModal/addAssetFilesModal.tsx @@ -7,7 +7,7 @@ import {connect} from "react-redux"; import {bindActionCreators, Dispatch} from "redux"; import {returntypeof} from 'react-redux-typescript'; import {RootState} from '../../../../state/reducers' -import {getI18n} from '../../../../../i18n/i18nRoot' +import {getI18n, LangObj} from '../../../../../i18n/i18nRoot' import {Button, Header, Icon, List, Modal} from 'semantic-ui-react' import {FilePreviewFromBackend} from '../../../../types/exerciseEditor' import {convertSizeToHumanReadableSize} from '../../../../helpers/convertersAndTransformers' @@ -106,6 +106,12 @@ export interface MyProps { */ readonly onClose: () => void + /** + * the tooltip for the file list where the files come from + * e.g only custom files or only from exercise tests... + */ + readonly filePreviewsListSourcesTooltip: keyof LangObj + } const mapStateToProps = (rootState: RootState, props: MyProps) => { @@ -194,8 +200,7 @@ class addAssetFilesModal extends React.Component<Props, any> { "All Files" )} ({this.props.allAssetFilePreviews.length})</h3> <HelpPopup - defaultText={getI18n(this.props.langId, - "These are all files where you have access to. For exercises or exercise tests you need permission to change the exercise." + defaultText={getI18n(this.props.langId, this.props.filePreviewsListSourcesTooltip )}/> </div> diff --git a/src/components/sites/exerciseEditorSite/exerciseEditorSite.tsx b/src/components/sites/exerciseEditorSite/exerciseEditorSite.tsx index 3cb02ac38ff21f217590b7c2eed3b0efd5c67e79..98a3afd057ec9abe05da39cb2e5e9e23f1742ce2 100644 --- a/src/components/sites/exerciseEditorSite/exerciseEditorSite.tsx +++ b/src/components/sites/exerciseEditorSite/exerciseEditorSite.tsx @@ -289,6 +289,8 @@ class exerciseEditorSite extends React.Component<Props & RouteComponentProps<Mat isBusy={this.props.isAddAssetFilesModalBusy} uploadInputId={'exercise-description-upload'} + filePreviewsListSourcesTooltip={"These are all files from exercise descriptions where you have the group permission to change the exercise and the exercise is visible to all."} + onUploadFile={async (file) => { this.props.setIsAddAssetFilesModalDisplayed(true, true) diff --git a/src/components/sites/exerciseEditorSite/exerciseTestsPanel/dialogs/changeTestView.tsx b/src/components/sites/exerciseEditorSite/exerciseTestsPanel/dialogs/changeTestView.tsx index 0eb6992e464b2174495ccd74f21a768681917585..6d53efa8a1ab1c9ae7d51b639ea4c645ad5357d2 100644 --- a/src/components/sites/exerciseEditorSite/exerciseTestsPanel/dialogs/changeTestView.tsx +++ b/src/components/sites/exerciseEditorSite/exerciseTestsPanel/dialogs/changeTestView.tsx @@ -258,6 +258,8 @@ class ChangeTestView extends React.Component<Props, any> { uploadInputId={'exercise-test-upload'} uploadPercentage={this.props.addTestAssetFilesModalUploadPercentage} + filePreviewsListSourcesTooltip={"These are all files from exercise tests where you have the group permission to change the exercise and the exercise is visible to all."} + onUploadFile={async (file) => { this.props.setIsAddTestAssetFilesModalDisplayed(true, true) diff --git a/src/constants.ts b/src/constants.ts index b3fed1f76b71bb411c640214c6b1a52613199554..b34561308a813f06ad76e17480dc435da098916f 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -13,7 +13,7 @@ import Logger from './helpers/logger' * y - breaking changes / new features * z - fixes, small changes */ -export const versionString = '2.5.1' +export const versionString = '2.5.2' export const supportMail = 'yapex@informatik.uni-halle.de'