Commit 262348f 1 parent bc1e25b commit 262348f Copy full SHA for 262348f
File tree 1 file changed +5
-2
lines changed
packages/moodle-lms-integration/src/webapp/ui/components
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,15 @@ export const SendToMoodle: FC<SendToMoodleProps> = ({
50
50
} )
51
51
52
52
const handleOnSendToMoodleClick = ( ) => {
53
+ const site = form . values . site
54
+ if ( site ?. trim ( ) !== '' && site ?. substring ( 0 , 4 ) . toLowerCase ( ) !== 'http' ) {
55
+ form . setFieldValue ( 'site' , `https://${ site } ` )
56
+ }
53
57
if ( form . isValid ) {
54
58
form . submitForm ( )
55
59
setIsAddingToMoodleLms ( false )
56
60
setShouldShowSendToMoodleLmsError ( false )
61
+ showSendSuccess ( )
57
62
} else {
58
63
setShouldShowSendToMoodleLmsError ( true )
59
64
}
@@ -94,15 +99,13 @@ export const SendToMoodle: FC<SendToMoodleProps> = ({
94
99
< PrimaryButton
95
100
onClick = { ( ) => {
96
101
handleOnSendToMoodleClick ( )
97
- showSendSuccess ( )
98
102
} }
99
103
>
100
104
Send
101
105
</ PrimaryButton >
102
106
}
103
107
onPressEnter = { ( ) => {
104
108
handleOnSendToMoodleClick ( )
105
- showSendSuccess ( )
106
109
} }
107
110
onClose = { ( ) => {
108
111
setIsAddingToMoodleLms ( false )
You can’t perform that action at this time.
0 commit comments