question.less 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. /* Question */
  2. .questionbank h2 {
  3. margin-top: 0;
  4. }
  5. .questioncategories h3 {
  6. margin-top: 0;
  7. }
  8. #chooseqtypebox {
  9. margin-top: 1em;
  10. }
  11. #chooseqtype h3 {
  12. margin: 0 0 0.3em;
  13. }
  14. #chooseqtype .instruction {
  15. display: none;
  16. }
  17. #chooseqtype .fakeqtypes {
  18. border-top: 1px solid silver;
  19. }
  20. #chooseqtype .qtypeoption {
  21. margin-bottom: 0.5em;
  22. }
  23. #chooseqtype label {
  24. display: block;
  25. }
  26. #chooseqtype .qtypename img {
  27. padding: 0 0.3em;
  28. }
  29. #chooseqtype .qtypename {
  30. display: inline-table;
  31. width: 16em;
  32. }
  33. #chooseqtype .qtypesummary {
  34. display: block;
  35. margin: 0 2em;
  36. }
  37. #chooseqtype .submitbuttons {
  38. margin: 0.7em 0;
  39. text-align: center;
  40. }
  41. #qtypechoicecontainer {
  42. display: none;
  43. }
  44. #qtypechoicecontainer_c.yui-panel-container.shadow .underlay {
  45. background: none;
  46. }
  47. #qtypechoicecontainer.yui-panel .hd {
  48. color: #333;
  49. letter-spacing: 1px;
  50. text-shadow: 1px 1px 1px #fff;
  51. .border-top-radius(10px);
  52. border: 1px solid #ccc;
  53. border-bottom: 1px solid #bbb;
  54. #gradient > .vertical(#fff, #ccc);
  55. }
  56. #qtypechoicecontainer {
  57. font-size: 12px;
  58. color: #333;
  59. background: #f2f2f2;
  60. border-radius: 10px;
  61. border: 1px solid #ccc;
  62. border-top: 0 none;
  63. box-shadow: 5px 5px 20px 0 #666;
  64. }
  65. #qtypechoicecontainer #chooseqtype {
  66. width: 40em;
  67. }
  68. #chooseqtypehead h3 {
  69. margin: 0;
  70. font-weight: normal;
  71. }
  72. #chooseqtype .qtypes {
  73. position: relative;
  74. border-bottom: 1px solid #bbb;
  75. padding: 0.24em 0;
  76. }
  77. #chooseqtype .alloptions {
  78. overflow-x: hidden;
  79. overflow-y: auto;
  80. max-height: 400px;
  81. max-height: calc(100vh - 15em);
  82. /* The next line is a workaround because recess is crap. Delete ththe following line once
  83. * https://github.com/twitter/recess/issues/59 / https://github.com/twitter/recess/issues/75
  84. * is fixed. The previous line is the right one. */
  85. max-height: 60vh;
  86. width: 60%;
  87. }
  88. #chooseqtype .qtypeoption {
  89. margin-bottom: 0;
  90. padding: 0.3em 0.3em 0.3em 1.6em;
  91. }
  92. #chooseqtype .qtypeoption img {
  93. vertical-align: text-bottom;
  94. padding-left: 1em;
  95. padding-right: 0.5em;
  96. }
  97. #chooseqtype .selected {
  98. background-color: #fff;
  99. box-shadow: 0px 0 10px 0 #ccc;
  100. }
  101. #chooseqtype .instruction,
  102. #chooseqtype .qtypesummary {
  103. display: none;
  104. position: absolute;
  105. top: 0;
  106. right: 0;
  107. bottom: 0;
  108. left: 60%;
  109. margin: 0;
  110. overflow-x: hidden;
  111. overflow-y: auto;
  112. padding: 1.5em 1.6em;
  113. background-color: #fff;
  114. overflow-y: auto;
  115. }
  116. #chooseqtype .instruction,
  117. #chooseqtype .selected .qtypesummary {
  118. display: block;
  119. }
  120. #categoryquestions {
  121. margin: 0;
  122. }
  123. #categoryquestions td,
  124. #categoryquestions th {
  125. padding: 0 0.2em;
  126. }
  127. #categoryquestions th {
  128. text-align: left;
  129. font-weight: normal;
  130. }
  131. #categoryquestions .checkbox {
  132. padding-left: 20px;
  133. }
  134. .questionbank .singleselect {
  135. margin: 0;
  136. }
  137. /* Question editing form */
  138. #combinedfeedbackhdr div.fhtmleditor {
  139. padding: 0;
  140. }
  141. #combinedfeedbackhdr div.fcheckbox {
  142. margin-bottom: 1em;
  143. }
  144. #multitriesheader div.fitem_feditor {
  145. margin-top: 1em;
  146. }
  147. #multitriesheader div.fitem_fgroup {
  148. margin-bottom: 1em;
  149. }
  150. #multitriesheader div.fitem_fgroup fieldset.felement label {
  151. margin-left: 0.3em;
  152. margin-right: 0.3em;
  153. }
  154. body.path-question-type .fitem_fgroup .accesshide {
  155. font: inherit;
  156. left: 0;
  157. position: static;
  158. padding-right: .3em;
  159. }
  160. .que {
  161. clear: left;
  162. text-align: left;
  163. margin: 0 auto 1.8em auto;
  164. }
  165. .que .info {
  166. float: left;
  167. width: 7em;
  168. padding: 0.5em;
  169. margin-bottom: 1.8em;
  170. background-color: @gray-lighter;
  171. border: 1px solid darken(spin(@gray-lighter, -10), 7%);
  172. border-radius: 2px;
  173. }
  174. .que h3.no {
  175. margin: 0;
  176. font-size: 0.8em;
  177. line-height: 1;
  178. }
  179. .que span.qno {
  180. font-size: 1.5em;
  181. font-weight: bold;
  182. }
  183. .que .info > div {
  184. font-size: 0.8em;
  185. margin-top: 0.7em;
  186. }
  187. .que .info .questionflag.editable {
  188. cursor: pointer;
  189. }
  190. .que .info .editquestion img,
  191. .que .info .questionflag img,
  192. .que .info .questionflag input {
  193. vertical-align: bottom;
  194. }
  195. .que .content {
  196. margin: 0 0 0 8.5em;
  197. }
  198. .que .formulation,
  199. .que .outcome,
  200. .que .comment {
  201. .alert
  202. }
  203. .que .formulation {
  204. .alert-info;
  205. color: @text-color;
  206. }
  207. .formulation input[type="text"],
  208. .formulation select {
  209. width: auto;
  210. }
  211. .path-mod-quiz input[size] {
  212. width: auto;
  213. }
  214. .que .outcome {
  215. }
  216. .que .comment {
  217. .alert-success;
  218. }
  219. .que .history {
  220. .well
  221. }
  222. .que .ablock {
  223. margin: 0.7em 0 0.3em 0;
  224. }
  225. .que .im-controls {
  226. margin-top: 0.5em;
  227. text-align: left;
  228. }
  229. .que .specificfeedback,
  230. .que .generalfeedback,
  231. .que .rightanswer,
  232. .que .im-feedback,
  233. .que .feedback,
  234. .que p {
  235. margin: 0 0 0.5em;
  236. }
  237. .que .qtext {
  238. margin-bottom: 1.5em;
  239. }
  240. .que .correctness {
  241. .label;
  242. &.correct {
  243. background-color: @label-success-bg;
  244. }
  245. &.partiallycorrect {
  246. background-color: @label-warning-bg;
  247. }
  248. &.notanswered,
  249. &.incorrect {
  250. background-color: @label-danger-bg;
  251. }
  252. }
  253. .que .validationerror {
  254. color: @state-danger-text;
  255. }
  256. // copied from .formFieldState in mixin.less
  257. // and made more specific
  258. .answerState(@text-color, @backgroundColor) {
  259. @borderColor: @text-color;
  260. color: @text-color;
  261. background-color: @backgroundColor;
  262. border-color: @borderColor;
  263. box-shadow: inset 0 1px 1px rgba(0,0,0,.075); // Redeclare so transitions work
  264. &:focus {
  265. border-color: darken(@borderColor, 10%);
  266. @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@borderColor, 20%);
  267. box-shadow: @shadow;
  268. }
  269. }
  270. .formulation .correct {
  271. background-color: @state-success-bg;
  272. }
  273. .formulation .partiallycorrect {
  274. background-color: @state-warning-bg;
  275. }
  276. .formulation .incorrect {
  277. background-color: @state-danger-bg;
  278. }
  279. .formulation select.correct,
  280. .formulation input.correct {
  281. .answerState(@state-success-text, @state-success-bg);
  282. }
  283. .formulation select.partiallycorrect,
  284. .formulation input.partiallycorrect {
  285. .answerState(@state-warning-text, @state-warning-bg);
  286. }
  287. .formulation select.incorrect,
  288. .formulation input.incorrect {
  289. .answerState(@state-danger-text, @state-danger-bg);
  290. }
  291. .que .grading,
  292. .que .comment,
  293. .que .commentlink,
  294. .que .history {
  295. margin-top: 0.5em;
  296. }
  297. .que .history h3 {
  298. margin: 0 0 0.2em;
  299. font-size: 1em;
  300. }
  301. .que .history table {
  302. width: 100%;
  303. margin: 0;
  304. }
  305. .que .history .current {
  306. font-weight: bold;
  307. }
  308. .que .questioncorrectnessicon {
  309. vertical-align: text-bottom;
  310. }
  311. .que input.questionflagimage {
  312. padding-right: 3px;
  313. }
  314. .importerror {
  315. margin-top: 10px;
  316. border-bottom: 1px solid #555;
  317. }
  318. .mform .que.comment .fitemtitle {
  319. width: 20%;
  320. }
  321. #page-question-preview #techinfo {
  322. margin: 1em 0;
  323. }
  324. // imported from quiz.css
  325. #page-mod-quiz-edit .questionbankwindow div.header {
  326. color: #444;
  327. text-shadow: none;
  328. padding: 3px;
  329. .border-top-radius(4px);
  330. margin: 0 -10px 0 -10px;
  331. padding: 2px 10px 2px 10px;
  332. background: transparent; /* Old browsers */
  333. }
  334. #page-mod-quiz-edit .questionbankwindow div.header a:link,
  335. #page-mod-quiz-edit .questionbankwindow div.header a:visited {
  336. color: @link-color;
  337. }
  338. #page-mod-quiz-edit .questionbankwindow div.header a:hover {
  339. color: @link-hover-color;
  340. }
  341. #page-mod-quiz-edit .questionbankwindow div.header .title {
  342. color: @text-color;
  343. }
  344. #page-mod-quiz-edit div.container div.generalbox {
  345. background-color: transparent;
  346. padding: 1.5em;
  347. }
  348. #page-mod-quiz-edit .categoryinfo {
  349. background-color: @body-bg;
  350. border-bottom: none;
  351. }
  352. #page-mod-quiz-edit div.questionbank .categoryquestionscontainer,
  353. #page-mod-quiz-edit div.questionbank .categorysortopotionscontainer,
  354. #page-mod-quiz-edit div.questionbank .categorypagingbarcontainer,
  355. #page-mod-quiz-edit div.questionbank .categoryselectallcontainer {
  356. padding: 0 0 1.5em 0;
  357. }
  358. #page-mod-quiz-edit div.questionbank .categorypagingbarcontainer {
  359. padding: 1em;
  360. background-color: transparent;
  361. margin: 0 -1.2em;
  362. border-top: none;
  363. border-bottom: none;
  364. }
  365. #page-mod-quiz-edit div.questionbank .categoryquestionscontainer {
  366. margin: 0 -1.2em -1em -1.2em;
  367. }
  368. #page-mod-quiz-edit div.question div.content div.questioncontrols {
  369. background-color: @body-bg;
  370. }
  371. #page-mod-quiz-edit div.question div.content div.points {
  372. margin-top: -0.5em;
  373. padding-bottom: 0.5em;
  374. border: none;
  375. background-color: @body-bg;
  376. }
  377. #page-mod-quiz-edit div.question div.content div.points label {
  378. display: inline-block;
  379. }
  380. #page-mod-quiz-edit div.quizpage .pagecontent .pagestatus {
  381. background-color: @body-bg;
  382. }
  383. #page-mod-quiz-edit .quizpagedelete,
  384. #page-mod-quiz-edit .quizpagedelete img {
  385. background-color: transparent;
  386. }
  387. #page-mod-quiz-edit div.quizpage .pagecontent {
  388. border: 1px solid #ddd;
  389. border-radius: 2px;
  390. overflow: hidden;
  391. }
  392. #page-mod-quiz-edit .modulespecificbuttonscontainer {
  393. width: 220px;
  394. }
  395. .questionbankwindow .module {
  396. width: auto;
  397. }
  398. #page-mod-quiz-edit div.editq div.question div.content {
  399. background-color: @body-bg;
  400. border: 1px solid #ddd;
  401. border-radius: 2px;
  402. overflow: hidden;
  403. }
  404. .path-mod-quiz .statedetails {
  405. display: block;
  406. font-size: 0.9em;
  407. }
  408. a#hidebankcmd {
  409. color: @link-color;
  410. }
  411. // override question plugins
  412. // qtype_shortanswer
  413. .que.shortanswer .answer {
  414. padding: 0;
  415. }
  416. .que label {
  417. display: inline;
  418. }
  419. /* Add a little padding to the answer sections of edit question forms. */
  420. .path-question-type #id_answerhdr .fitem .fitemtitle,
  421. .path-question-type #id_answerhdr .fitem .felement {
  422. margin-left: 6px;
  423. margin-right: 6px;
  424. }
  425. .path-question-type #id_answerhdr .fitem_feditor .felement {
  426. margin-left: 0px;
  427. margin-right: 0px;
  428. }