Following-up this answer, I would like to
1- have a key/option for the package that sets the default width. For example, something like \usepackage[default-width = outer]{examwsolns}
2- understand what userdefinedwidth = \textwidth means as an option passed to the mdframed environment of the wide solution. Shouldn't it mean that the default width is the \textwidth? If yes, why the width of the solutions of the question and the part doesn't respect it?
P.S. the definition of the package examwsolns can be found here.
\documentclass[answers]{exam}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{examwsolns}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{tikz}
% Default additional arguments to pass to the 'mdframed' environment
\examwsolnsSetMdFramedDefaultArgs{
skipabove = \baselineskip,
innertopmargin = \baselineskip,
innerbottommargin = \baselineskip,
userdefinedwidth = \textwidth
}
\begin{document}
Here is a full line:
\par\noindent\hrulefill
\begin{wsolution}
Autodetected outer level.
\end{wsolution}
\begin{questions}
\question A question.
\begin{wsolution}
Autodetected question level.
\end{wsolution}
\begin{parts}
\part A part
\begin{wsolution}[][innertopmargin = 2\baselineskip,
innerbottommargin = 2\baselineskip,
backgroundcolor=gray!40,
userdefinedwidth = \textwidth]
Autodetected part level.
\end{wsolution}
\end{parts}
\end{questions}
\end{document}

