mumuki-laboratory icon indicating copy to clipboard operation
mumuki-laboratory copied to clipboard

Upload exercises should never show nav tabs

Open felipecalvo opened this issue 3 years ago • 0 comments

Showing (or not) the navigation tabs (problem, console, extra code, etc) is decided ultimately by the following:

https://github.com/mumuki/mumuki-laboratory/blob/ef77b5c50c734cf8e03e261a859732b061230fd2/app/helpers/exercise_input_helper.rb#L30-L32

Since it's the language the one which decides if the exercise is queriable or not (https://github.com/mumuki/mumuki-domain/blob/11818a3f1bc0edf276f8baa001e430df05cf288a/app/models/concerns/with_language.rb#L6-L9), the tabs are shown even in exercises with queriable languages that shouldn't have them, such as upload:

image

This doesn't happen on multiple or single choice exercises because we're creating them with language text, which is not queriable.

Creating upload exercises as text shouldn't be a workaround, because the upload input has an accept field which expects file extensions according to the exercise's language - and we probably don't want a .txt.

felipecalvo avatar Apr 05 '21 14:04 felipecalvo