SloodleModuleChoice.html 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <!-- template designed by Marco Von Ballmoos -->
  6. <title>Docs For Class SloodleModuleChoice</title>
  7. <link rel="stylesheet" href="../media/stylesheet.css" />
  8. <script src="../media/lib/classTree.js"></script>
  9. <script language="javascript" type="text/javascript">
  10. var imgPlus = new Image();
  11. var imgMinus = new Image();
  12. imgPlus.src = "../media/images/plus.png";
  13. imgMinus.src = "../media/images/minus.png";
  14. function showNode(Node){
  15. switch(navigator.family){
  16. case 'nn4':
  17. // Nav 4.x code fork...
  18. var oTable = document.layers["span" + Node];
  19. var oImg = document.layers["img" + Node];
  20. break;
  21. case 'ie4':
  22. // IE 4/5 code fork...
  23. var oTable = document.all["span" + Node];
  24. var oImg = document.all["img" + Node];
  25. break;
  26. case 'gecko':
  27. // Standards Compliant code fork...
  28. var oTable = document.getElementById("span" + Node);
  29. var oImg = document.getElementById("img" + Node);
  30. break;
  31. }
  32. oImg.src = imgMinus.src;
  33. oTable.style.display = "block";
  34. }
  35. function hideNode(Node){
  36. switch(navigator.family){
  37. case 'nn4':
  38. // Nav 4.x code fork...
  39. var oTable = document.layers["span" + Node];
  40. var oImg = document.layers["img" + Node];
  41. break;
  42. case 'ie4':
  43. // IE 4/5 code fork...
  44. var oTable = document.all["span" + Node];
  45. var oImg = document.all["img" + Node];
  46. break;
  47. case 'gecko':
  48. // Standards Compliant code fork...
  49. var oTable = document.getElementById("span" + Node);
  50. var oImg = document.getElementById("img" + Node);
  51. break;
  52. }
  53. oImg.src = imgPlus.src;
  54. oTable.style.display = "none";
  55. }
  56. function nodeIsVisible(Node){
  57. switch(navigator.family){
  58. case 'nn4':
  59. // Nav 4.x code fork...
  60. var oTable = document.layers["span" + Node];
  61. break;
  62. case 'ie4':
  63. // IE 4/5 code fork...
  64. var oTable = document.all["span" + Node];
  65. break;
  66. case 'gecko':
  67. // Standards Compliant code fork...
  68. var oTable = document.getElementById("span" + Node);
  69. break;
  70. }
  71. return (oTable && oTable.style.display == "block");
  72. }
  73. function toggleNodeVisibility(Node){
  74. if (nodeIsVisible(Node)){
  75. hideNode(Node);
  76. }else{
  77. showNode(Node);
  78. }
  79. }
  80. </script>
  81. </head>
  82. <body>
  83. <div class="page-body">
  84. <h2 class="class-name"><img src="../media/images/Class_logo.png"
  85. alt=" Class"
  86. title=" Class"
  87. style="vertical-align: middle"> SloodleModuleChoice</h2>
  88. <a name="sec-description"></a>
  89. <div class="info-box">
  90. <div class="info-box-title">Description</div>
  91. <div class="nav-bar">
  92. <span class="disabled">Description</span> |
  93. <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
  94. | <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
  95. </div>
  96. <div class="info-box-body">
  97. <!-- ========== Info from phpDoc block ========= -->
  98. <p class="short-description">The Sloodle choice module class.</p>
  99. <p class="notes">
  100. Located in <a class="field" href="_lib---modules---module_choice.php.html">/lib/modules/module_choice.php</a> (line <span class="field"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a26">26</a></span>)
  101. </p>
  102. <pre><a href="../sloodle/SloodleModule.html">SloodleModule</a>
  103. |
  104. --SloodleModuleChoice</pre>
  105. </div>
  106. </div>
  107. <a name="sec-var-summary"></a>
  108. <div class="info-box">
  109. <div class="info-box-title">Variable Summary</span></div>
  110. <div class="nav-bar">
  111. <a href="#sec-description">Description</a> |
  112. <span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
  113. |
  114. <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
  115. </div>
  116. <div class="info-box-body">
  117. <div class="var-summary">
  118. <div class="var-title">
  119. <img src="../media/images/PrivateVariable.png" alt=" " />
  120. <span class="var-type">object</span>
  121. <a href="#$cm" title="details" class="var-name">$cm</a>
  122. </div>
  123. <div class="var-title">
  124. <img src="../media/images/PrivateVariable.png" alt=" " />
  125. <span class="var-type">object</span>
  126. <a href="#$moodle_choice_instance" title="details" class="var-name">$moodle_choice_instance</a>
  127. </div>
  128. <div class="var-title">
  129. <img src="../media/images/PrivateVariable.png" alt=" " />
  130. <span class="var-type">int</span>
  131. <a href="#$numunanswered" title="details" class="var-name">$numunanswered</a>
  132. </div>
  133. <div class="var-title">
  134. <img src="../media/images/Variable.png" alt=" " />
  135. <span class="var-type">array</span>
  136. <a href="#$options" title="details" class="var-name">$options</a>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <a name="sec-method-summary"></a>
  142. <div class="info-box">
  143. <div class="info-box-title">Method Summary</span></div>
  144. <div class="nav-bar">
  145. <a href="#sec-description">Description</a> |
  146. <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
  147. |
  148. <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
  149. </div>
  150. <div class="info-box-body">
  151. <div class="method-summary">
  152. <div class="method-definition">
  153. <img src="../media/images/Constructor.png" alt=" "/>
  154. <span class="method-result">SloodleModuleChoice</span>
  155. <a href="#SloodleModuleChoice" title="details" class="method-name">SloodleModuleChoice</a>
  156. (<span class="var-type"></span>&nbsp;<span class="var-name">&$_session</span>)
  157. </div>
  158. <div class="method-definition">
  159. <img src="../media/images/Method.png" alt=" "/>
  160. <span class="method-result">bool</span>
  161. <a href="#allow_update" title="details" class="method-name">allow_update</a>
  162. ()
  163. </div>
  164. <div class="method-definition">
  165. <img src="../media/images/Method.png" alt=" "/>
  166. <span class="method-result">bool</span>
  167. <a href="#can_show_results" title="details" class="method-name">can_show_results</a>
  168. ()
  169. </div>
  170. <div class="method-definition">
  171. <img src="../media/images/Method.png" alt=" "/>
  172. <span class="method-result">int</span>
  173. <a href="#get_closing_time" title="details" class="method-name">get_closing_time</a>
  174. ()
  175. </div>
  176. <div class="method-definition">
  177. <img src="../media/images/Method.png" alt=" "/>
  178. <span class="method-result">mixed</span>
  179. <a href="#get_course_id" title="details" class="method-name">get_course_id</a>
  180. ()
  181. </div>
  182. <div class="method-definition">
  183. <img src="../media/images/Method.png" alt=" "/>
  184. <span class="method-result">int</span>
  185. <a href="#get_creation_time" title="details" class="method-name">get_creation_time</a>
  186. ()
  187. </div>
  188. <div class="method-definition">
  189. <img src="../media/images/Method.png" alt=" "/>
  190. <span class="method-result">string</span>
  191. <a href="#get_intro" title="details" class="method-name">get_intro</a>
  192. ()
  193. </div>
  194. <div class="method-definition">
  195. <img src="../media/images/Method.png" alt=" "/>
  196. <span class="method-result">int</span>
  197. <a href="#get_modification_time" title="details" class="method-name">get_modification_time</a>
  198. ()
  199. </div>
  200. <div class="method-definition">
  201. <img src="../media/images/Method.png" alt=" "/>
  202. <span class="method-result">string</span>
  203. <a href="#get_name" title="details" class="method-name">get_name</a>
  204. ()
  205. </div>
  206. <div class="method-definition">
  207. <img src="../media/images/Method.png" alt=" "/>
  208. <span class="method-result">int</span>
  209. <a href="#get_num_unanswered" title="details" class="method-name">get_num_unanswered</a>
  210. ()
  211. </div>
  212. <div class="method-definition">
  213. <img src="../media/images/Method.png" alt=" "/>
  214. <span class="method-result">int</span>
  215. <a href="#get_opening_time" title="details" class="method-name">get_opening_time</a>
  216. ()
  217. </div>
  218. <div class="method-definition">
  219. <img src="../media/images/Method.png" alt=" "/>
  220. <span class="method-result">string</span>
  221. <a href="#get_type" title="details" class="method-name">get_type</a>
  222. ()
  223. </div>
  224. <div class="method-definition">
  225. <img src="../media/images/Method.png" alt=" "/>
  226. <span class="method-result">string</span>
  227. <a href="#get_type_full" title="details" class="method-name">get_type_full</a>
  228. ()
  229. </div>
  230. <div class="method-definition">
  231. <img src="../media/images/Method.png" alt=" "/>
  232. <span class="method-result">bool</span>
  233. <a href="#is_early" title="details" class="method-name">is_early</a>
  234. ([<span class="var-type">int</span>&nbsp;<span class="var-name">$timestamp</span> = <span class="var-default">null</span>])
  235. </div>
  236. <div class="method-definition">
  237. <img src="../media/images/Method.png" alt=" "/>
  238. <span class="method-result">bool</span>
  239. <a href="#is_late" title="details" class="method-name">is_late</a>
  240. ([<span class="var-type">int</span>&nbsp;<span class="var-name">$timestamp</span> = <span class="var-default">null</span>])
  241. </div>
  242. <div class="method-definition">
  243. <img src="../media/images/Method.png" alt=" "/>
  244. <span class="method-result">bool</span>
  245. <a href="#is_open" title="details" class="method-name">is_open</a>
  246. ([<span class="var-type">int</span>&nbsp;<span class="var-name">$timestamp</span> = <span class="var-default">null</span>])
  247. </div>
  248. <div class="method-definition">
  249. <img src="../media/images/Method.png" alt=" "/>
  250. <span class="method-result">bool</span>
  251. <a href="#load" title="details" class="method-name">load</a>
  252. (<span class="var-type">mixed</span>&nbsp;<span class="var-name">$id</span>)
  253. </div>
  254. <div class="method-definition">
  255. <img src="../media/images/Method.png" alt=" "/>
  256. <span class="method-result">integer|false</span>
  257. <a href="#select_option" title="details" class="method-name">select_option</a>
  258. (<span class="var-type">mixed</span>&nbsp;<span class="var-name">$optionid</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$user</span> = <span class="var-default">null</span>])
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. <a name="sec-vars"></a>
  264. <div class="info-box">
  265. <div class="info-box-title">Variables</div>
  266. <div class="nav-bar">
  267. <a href="#sec-description">Description</a> |
  268. <a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
  269. |
  270. <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
  271. </div>
  272. <div class="info-box-body">
  273. <a name="var$cm" id="$cm"><!-- --></A>
  274. <div class="evenrow">
  275. <div class="var-header">
  276. <img src="../media/images/PrivateVariable.png" />
  277. <span class="var-title">
  278. <span class="var-type">object</span>
  279. <span class="var-name">$cm</span>
  280. = <span class="var-default"> null</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a36">36</a></span>)
  281. </span>
  282. </div>
  283. <!-- ========== Info from phpDoc block ========= -->
  284. <p class="short-description">Internal for Moodle only - course module instance.</p>
  285. <p class="description"><p>Corresponds to one record from the Moodle 'course_modules' table.</p></p>
  286. <ul class="tags">
  287. <li><span class="field">access:</span> private</li>
  288. </ul>
  289. </div>
  290. <a name="var$moodle_choice_instance" id="$moodle_choice_instance"><!-- --></A>
  291. <div class="oddrow">
  292. <div class="var-header">
  293. <img src="../media/images/PrivateVariable.png" />
  294. <span class="var-title">
  295. <span class="var-type">object</span>
  296. <span class="var-name">$moodle_choice_instance</span>
  297. = <span class="var-default"> null</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a44">44</a></span>)
  298. </span>
  299. </div>
  300. <!-- ========== Info from phpDoc block ========= -->
  301. <p class="short-description">Internal only - Moodle choice module instance database object.</p>
  302. <p class="description"><p>Corresponds to one record from the Moodle 'choice' table.</p></p>
  303. <ul class="tags">
  304. <li><span class="field">access:</span> private</li>
  305. </ul>
  306. </div>
  307. <a name="var$numunanswered" id="$numunanswered"><!-- --></A>
  308. <div class="evenrow">
  309. <div class="var-header">
  310. <img src="../media/images/PrivateVariable.png" />
  311. <span class="var-title">
  312. <span class="var-type">int</span>
  313. <span class="var-name">$numunanswered</span>
  314. = <span class="var-default"> 0</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a51">51</a></span>)
  315. </span>
  316. </div>
  317. <!-- ========== Info from phpDoc block ========= -->
  318. <p class="short-description">The number of (non-admin) users on the course who have not yet answered this choice.</p>
  319. <ul class="tags">
  320. <li><span class="field">access:</span> private</li>
  321. </ul>
  322. </div>
  323. <a name="var$options" id="$options"><!-- --></A>
  324. <div class="oddrow">
  325. <div class="var-header">
  326. <img src="../media/images/Variable.png" />
  327. <span class="var-title">
  328. <span class="var-type">array</span>
  329. <span class="var-name">$options</span>
  330. = <span class="var-default">array()</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a58">58</a></span>)
  331. </span>
  332. </div>
  333. <!-- ========== Info from phpDoc block ========= -->
  334. <p class="short-description">The options available for this choice, as an associative array of IDs to <a href="../sloodle/SloodleChoiceOption.html">SloodleChoiceOption</a> objects.</p>
  335. <ul class="tags">
  336. <li><span class="field">access:</span> public</li>
  337. </ul>
  338. </div>
  339. <h4>Inherited Variables</h4>
  340. <A NAME='inherited_vars'><!-- --></A>
  341. <p>Inherited from <span class="classname"><a href="../sloodle/SloodleModule.html">SloodleModule</a></span></p>
  342. <blockquote>
  343. <img src="../media/images/Variable.png" />
  344. <span class="var-title">
  345. <span class="var-name"><a href="../sloodle/SloodleModule.html#var$_session">SloodleModule::$_session</a></span><br>
  346. </span>
  347. </blockquote>
  348. </div>
  349. </div>
  350. <a name="sec-methods"></a>
  351. <div class="info-box">
  352. <div class="info-box-title">Methods</div>
  353. <div class="nav-bar">
  354. <a href="#sec-description">Description</a> |
  355. <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
  356. <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
  357. </div>
  358. <div class="info-box-body">
  359. <A NAME='method_detail'></A>
  360. <a name="methodSloodleModuleChoice" id="SloodleModuleChoice"><!-- --></a>
  361. <div class="evenrow">
  362. <div class="method-header">
  363. <img src="../media/images/Constructor.png" />
  364. <span class="method-title">Constructor SloodleModuleChoice</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a66">66</a></span>)
  365. </div>
  366. <!-- ========== Info from phpDoc block ========= -->
  367. <p class="short-description">Constructor</p>
  368. <div class="method-signature">
  369. <span class="method-result">SloodleModuleChoice</span>
  370. <span class="method-name">
  371. SloodleModuleChoice
  372. </span>
  373. (<span class="var-type"></span>&nbsp;<span class="var-name">&$_session</span>)
  374. </div>
  375. <ul class="parameters">
  376. <li>
  377. <span class="var-type"></span>
  378. <span class="var-name">&$_session</span> </li>
  379. </ul>
  380. </div>
  381. <a name="methodallow_update" id="allow_update"><!-- --></a>
  382. <div class="oddrow">
  383. <div class="method-header">
  384. <img src="../media/images/Method.png" />
  385. <span class="method-title">allow_update</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a349">349</a></span>)
  386. </div>
  387. <!-- ========== Info from phpDoc block ========= -->
  388. <p class="short-description">Checks if users are allowed to re-select their answer in this choice.</p>
  389. <div class="method-signature">
  390. <span class="method-result">bool</span>
  391. <span class="method-name">
  392. allow_update
  393. </span>
  394. ()
  395. </div>
  396. </div>
  397. <a name="methodcan_show_results" id="can_show_results"><!-- --></a>
  398. <div class="evenrow">
  399. <div class="method-header">
  400. <img src="../media/images/Method.png" />
  401. <span class="method-title">can_show_results</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a359">359</a></span>)
  402. </div>
  403. <!-- ========== Info from phpDoc block ========= -->
  404. <p class="short-description">Checks if results are to be shown.</p>
  405. <p class="description"><p>(Some choices only allow results after the choice is closed).</p></p>
  406. <div class="method-signature">
  407. <span class="method-result">bool</span>
  408. <span class="method-name">
  409. can_show_results
  410. </span>
  411. ()
  412. </div>
  413. </div>
  414. <a name="methodget_closing_time" id="get_closing_time"><!-- --></a>
  415. <div class="oddrow">
  416. <div class="method-header">
  417. <img src="../media/images/Method.png" />
  418. <span class="method-title">get_closing_time</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a293">293</a></span>)
  419. </div>
  420. <!-- ========== Info from phpDoc block ========= -->
  421. <p class="short-description">Gets the time at which this choice closes.</p>
  422. <ul class="tags">
  423. <li><span class="field">return:</span> Timestamp. 0 if choice has no closing time.</li>
  424. </ul>
  425. <div class="method-signature">
  426. <span class="method-result">int</span>
  427. <span class="method-name">
  428. get_closing_time
  429. </span>
  430. ()
  431. </div>
  432. </div>
  433. <a name="methodget_course_id" id="get_course_id"><!-- --></a>
  434. <div class="evenrow">
  435. <div class="method-header">
  436. <img src="../media/images/Method.png" />
  437. <span class="method-title">get_course_id</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a237">237</a></span>)
  438. </div>
  439. <!-- ========== Info from phpDoc block ========= -->
  440. <p class="short-description">Gets the identifier of the course this controller belongs to.</p>
  441. <ul class="tags">
  442. <li><span class="field">return:</span> Course identifier. Type depends on VLE. (In Moodle, it will be an integer).</li>
  443. </ul>
  444. <div class="method-signature">
  445. <span class="method-result">mixed</span>
  446. <span class="method-name">
  447. get_course_id
  448. </span>
  449. ()
  450. </div>
  451. <hr class="separator" />
  452. <div class="notes">Redefinition of:</div>
  453. <dl>
  454. <dt><a href="../sloodle/SloodleModule.html#methodget_course_id">SloodleModule::get_course_id()</a></dt>
  455. <dd>Gets the identifier of the course this controller belongs to.</dd>
  456. </dl>
  457. </div>
  458. <a name="methodget_creation_time" id="get_creation_time"><!-- --></a>
  459. <div class="oddrow">
  460. <div class="method-header">
  461. <img src="../media/images/Method.png" />
  462. <span class="method-title">get_creation_time</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a246">246</a></span>)
  463. </div>
  464. <!-- ========== Info from phpDoc block ========= -->
  465. <p class="short-description">Gets the time at which this instance was created, or 0 if unknown.</p>
  466. <ul class="tags">
  467. <li><span class="field">return:</span> Timestamp</li>
  468. </ul>
  469. <div class="method-signature">
  470. <span class="method-result">int</span>
  471. <span class="method-name">
  472. get_creation_time
  473. </span>
  474. ()
  475. </div>
  476. <hr class="separator" />
  477. <div class="notes">Redefinition of:</div>
  478. <dl>
  479. <dt><a href="../sloodle/SloodleModule.html#methodget_creation_time">SloodleModule::get_creation_time()</a></dt>
  480. <dd>Gets the time at which this instance was created, or 0 if unknown.</dd>
  481. </dl>
  482. </div>
  483. <a name="methodget_intro" id="get_intro"><!-- --></a>
  484. <div class="evenrow">
  485. <div class="method-header">
  486. <img src="../media/images/Method.png" />
  487. <span class="method-title">get_intro</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a228">228</a></span>)
  488. </div>
  489. <!-- ========== Info from phpDoc block ========= -->
  490. <p class="short-description">Gets the intro description of this module instance, if available.</p>
  491. <ul class="tags">
  492. <li><span class="field">return:</span> The intro description of this controller</li>
  493. </ul>
  494. <div class="method-signature">
  495. <span class="method-result">string</span>
  496. <span class="method-name">
  497. get_intro
  498. </span>
  499. ()
  500. </div>
  501. <hr class="separator" />
  502. <div class="notes">Redefinition of:</div>
  503. <dl>
  504. <dt><a href="../sloodle/SloodleModule.html#methodget_intro">SloodleModule::get_intro()</a></dt>
  505. <dd>Gets the intro description of this module instance, if available.</dd>
  506. </dl>
  507. </div>
  508. <a name="methodget_modification_time" id="get_modification_time"><!-- --></a>
  509. <div class="oddrow">
  510. <div class="method-header">
  511. <img src="../media/images/Method.png" />
  512. <span class="method-title">get_modification_time</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a255">255</a></span>)
  513. </div>
  514. <!-- ========== Info from phpDoc block ========= -->
  515. <p class="short-description">Gets the time at which this instance was last modified, or 0 if unknown.</p>
  516. <ul class="tags">
  517. <li><span class="field">return:</span> Timestamp</li>
  518. </ul>
  519. <div class="method-signature">
  520. <span class="method-result">int</span>
  521. <span class="method-name">
  522. get_modification_time
  523. </span>
  524. ()
  525. </div>
  526. <hr class="separator" />
  527. <div class="notes">Redefinition of:</div>
  528. <dl>
  529. <dt><a href="../sloodle/SloodleModule.html#methodget_modification_time">SloodleModule::get_modification_time()</a></dt>
  530. <dd>Gets the time at which this instance was last modified, or 0 if unknown.</dd>
  531. </dl>
  532. </div>
  533. <a name="methodget_name" id="get_name"><!-- --></a>
  534. <div class="evenrow">
  535. <div class="method-header">
  536. <img src="../media/images/Method.png" />
  537. <span class="method-title">get_name</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a219">219</a></span>)
  538. </div>
  539. <!-- ========== Info from phpDoc block ========= -->
  540. <p class="short-description">Gets the name of this module instance.</p>
  541. <ul class="tags">
  542. <li><span class="field">return:</span> The name of this controller</li>
  543. </ul>
  544. <div class="method-signature">
  545. <span class="method-result">string</span>
  546. <span class="method-name">
  547. get_name
  548. </span>
  549. ()
  550. </div>
  551. <hr class="separator" />
  552. <div class="notes">Redefinition of:</div>
  553. <dl>
  554. <dt><a href="../sloodle/SloodleModule.html#methodget_name">SloodleModule::get_name()</a></dt>
  555. <dd>Gets the name of this module instance.</dd>
  556. </dl>
  557. </div>
  558. <a name="methodget_num_unanswered" id="get_num_unanswered"><!-- --></a>
  559. <div class="oddrow">
  560. <div class="method-header">
  561. <img src="../media/images/Method.png" />
  562. <span class="method-title">get_num_unanswered</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a371">371</a></span>)
  563. </div>
  564. <!-- ========== Info from phpDoc block ========= -->
  565. <p class="short-description">Gets the number of people who have not yet answered the choice.</p>
  566. <p class="description"><p>Counts all users on the course, including students and teachers.</p></p>
  567. <div class="method-signature">
  568. <span class="method-result">int</span>
  569. <span class="method-name">
  570. get_num_unanswered
  571. </span>
  572. ()
  573. </div>
  574. </div>
  575. <a name="methodget_opening_time" id="get_opening_time"><!-- --></a>
  576. <div class="evenrow">
  577. <div class="method-header">
  578. <img src="../media/images/Method.png" />
  579. <span class="method-title">get_opening_time</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a284">284</a></span>)
  580. </div>
  581. <!-- ========== Info from phpDoc block ========= -->
  582. <p class="short-description">Gets the time at which this choice opens.</p>
  583. <ul class="tags">
  584. <li><span class="field">return:</span> Timestamp. 0 if choice has no opening time.</li>
  585. </ul>
  586. <div class="method-signature">
  587. <span class="method-result">int</span>
  588. <span class="method-name">
  589. get_opening_time
  590. </span>
  591. ()
  592. </div>
  593. </div>
  594. <a name="methodget_type" id="get_type"><!-- --></a>
  595. <div class="oddrow">
  596. <div class="method-header">
  597. <img src="../media/images/Method.png" />
  598. <span class="method-title">get_type</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a265">265</a></span>)
  599. </div>
  600. <!-- ========== Info from phpDoc block ========= -->
  601. <p class="short-description">Gets the short type name of this instance.</p>
  602. <div class="method-signature">
  603. <span class="method-result">string</span>
  604. <span class="method-name">
  605. get_type
  606. </span>
  607. ()
  608. </div>
  609. <hr class="separator" />
  610. <div class="notes">Redefinition of:</div>
  611. <dl>
  612. <dt><a href="../sloodle/SloodleModule.html#methodget_type">SloodleModule::get_type()</a></dt>
  613. <dd>Gets the short type name of this instance.</dd>
  614. </dl>
  615. </div>
  616. <a name="methodget_type_full" id="get_type_full"><!-- --></a>
  617. <div class="evenrow">
  618. <div class="method-header">
  619. <img src="../media/images/Method.png" />
  620. <span class="method-title">get_type_full</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a275">275</a></span>)
  621. </div>
  622. <!-- ========== Info from phpDoc block ========= -->
  623. <p class="short-description">Gets the full type name of this instance, according to the current language pack, if available.</p>
  624. <p class="description"><p>Note: should be overridden by sub-classes.</p></p>
  625. <ul class="tags">
  626. <li><span class="field">return:</span> Full type name if possible, or the short name otherwise.</li>
  627. </ul>
  628. <div class="method-signature">
  629. <span class="method-result">string</span>
  630. <span class="method-name">
  631. get_type_full
  632. </span>
  633. ()
  634. </div>
  635. <hr class="separator" />
  636. <div class="notes">Redefinition of:</div>
  637. <dl>
  638. <dt><a href="../sloodle/SloodleModule.html#methodget_type_full">SloodleModule::get_type_full()</a></dt>
  639. <dd>Gets the full type name of this instance, according to the current language pack, if available.</dd>
  640. </dl>
  641. </div>
  642. <a name="methodis_early" id="is_early"><!-- --></a>
  643. <div class="oddrow">
  644. <div class="method-header">
  645. <img src="../media/images/Method.png" />
  646. <span class="method-title">is_early</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a320">320</a></span>)
  647. </div>
  648. <!-- ========== Info from phpDoc block ========= -->
  649. <p class="short-description">Determines if the choice has not opened yet.</p>
  650. <div class="method-signature">
  651. <span class="method-result">bool</span>
  652. <span class="method-name">
  653. is_early
  654. </span>
  655. ([<span class="var-type">int</span>&nbsp;<span class="var-name">$timestamp</span> = <span class="var-default">null</span>])
  656. </div>
  657. <ul class="parameters">
  658. <li>
  659. <span class="var-type">int</span>
  660. <span class="var-name">$timestamp</span><span class="var-description">: The time to test. Uses the current time if none is given.</span> </li>
  661. </ul>
  662. </div>
  663. <a name="methodis_late" id="is_late"><!-- --></a>
  664. <div class="evenrow">
  665. <div class="method-header">
  666. <img src="../media/images/Method.png" />
  667. <span class="method-title">is_late</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a335">335</a></span>)
  668. </div>
  669. <!-- ========== Info from phpDoc block ========= -->
  670. <p class="short-description">Determines if the choice has already closed.</p>
  671. <div class="method-signature">
  672. <span class="method-result">bool</span>
  673. <span class="method-name">
  674. is_late
  675. </span>
  676. ([<span class="var-type">int</span>&nbsp;<span class="var-name">$timestamp</span> = <span class="var-default">null</span>])
  677. </div>
  678. <ul class="parameters">
  679. <li>
  680. <span class="var-type">int</span>
  681. <span class="var-name">$timestamp</span><span class="var-description">: The time to test. Uses the current time if none is given.</span> </li>
  682. </ul>
  683. </div>
  684. <a name="methodis_open" id="is_open"><!-- --></a>
  685. <div class="oddrow">
  686. <div class="method-header">
  687. <img src="../media/images/Method.png" />
  688. <span class="method-title">is_open</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a303">303</a></span>)
  689. </div>
  690. <!-- ========== Info from phpDoc block ========= -->
  691. <p class="short-description">Determines if the choice is currently open.</p>
  692. <div class="method-signature">
  693. <span class="method-result">bool</span>
  694. <span class="method-name">
  695. is_open
  696. </span>
  697. ([<span class="var-type">int</span>&nbsp;<span class="var-name">$timestamp</span> = <span class="var-default">null</span>])
  698. </div>
  699. <ul class="parameters">
  700. <li>
  701. <span class="var-type">int</span>
  702. <span class="var-name">$timestamp</span><span class="var-description">: The time to test. Uses the current time if none is given.</span> </li>
  703. </ul>
  704. </div>
  705. <a name="methodload" id="load"><!-- --></a>
  706. <div class="evenrow">
  707. <div class="method-header">
  708. <img src="../media/images/Method.png" />
  709. <span class="method-title">load</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a78">78</a></span>)
  710. </div>
  711. <!-- ========== Info from phpDoc block ========= -->
  712. <p class="short-description">Loads data from the database.</p>
  713. <p class="description"><p>Note: even if the function fails, it may still have overwritten some or all existing data in the object.</p></p>
  714. <ul class="tags">
  715. <li><span class="field">return:</span> True if successful, or false otherwise</li>
  716. </ul>
  717. <div class="method-signature">
  718. <span class="method-result">bool</span>
  719. <span class="method-name">
  720. load
  721. </span>
  722. (<span class="var-type">mixed</span>&nbsp;<span class="var-name">$id</span>)
  723. </div>
  724. <ul class="parameters">
  725. <li>
  726. <span class="var-type">mixed</span>
  727. <span class="var-name">$id</span><span class="var-description">: The site-wide unique identifier for all modules. Type depends on VLE. On Moodle, it is an integer course module identifier ('id' field of 'course_modules' table)</span> </li>
  728. </ul>
  729. <hr class="separator" />
  730. <div class="notes">Redefinition of:</div>
  731. <dl>
  732. <dt><a href="../sloodle/SloodleModule.html#methodload">SloodleModule::load()</a></dt>
  733. <dd>Loads data from the database.</dd>
  734. </dl>
  735. </div>
  736. <a name="methodselect_option" id="select_option"><!-- --></a>
  737. <div class="oddrow">
  738. <div class="method-header">
  739. <img src="../media/images/Method.png" />
  740. <span class="method-title">select_option</span> (line <span class="line-number"><a href="../__filesource/fsource_sloodle__libmodulesmodule_choice.php.html#a150">150</a></span>)
  741. </div>
  742. <!-- ========== Info from phpDoc block ========= -->
  743. <p class="short-description">Selects an option in this choice on behalf of the specified user.</p>
  744. <p class="description"><p>Logs the user in to the VLE if necessary. If a general error occurs, FALSE will be returned. Otherwise, an integer <a href="http://slisweb.sjsu.edu/sl/index.php/Sloodle_status_codes">status code</a> will be returned. The following status codes are typical responses: * 10011 = added new choice selection * 10012 = updated existing choice selection * 10013 = user previously selected same option * -10011 = User already made a selection, and re-selection is not allowed * -10012 = max number of selections for this option already made * -10013 = choice is not yet open * -10014 = choice is already closed</p></p>
  745. <div class="method-signature">
  746. <span class="method-result">integer|false</span>
  747. <span class="method-name">
  748. select_option
  749. </span>
  750. (<span class="var-type">mixed</span>&nbsp;<span class="var-name">$optionid</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$user</span> = <span class="var-default">null</span>])
  751. </div>
  752. <ul class="parameters">
  753. <li>
  754. <span class="var-type">mixed</span>
  755. <span class="var-name">$optionid</span><span class="var-description">: The unique site-wide identifier of the option to be selected</span> </li>
  756. <li>
  757. <span class="var-type">mixed</span>
  758. <span class="var-name">$user</span><span class="var-description">: A SloodleUser identifying the current user; if omitted, the current <a href="../sloodle/SloodleSession.html">SloodleSession</a> will be used.</span> </li>
  759. </ul>
  760. </div>
  761. <h4>Inherited Methods</h4>
  762. <a name='inherited_methods'><!-- --></a>
  763. <!-- =========== Summary =========== -->
  764. <p>Inherited From <span class="classname"><a href="../sloodle/SloodleModule.html">SloodleModule</a></span></p>
  765. <blockquote>
  766. <img src="../media/images/Constructor.png" alt=" "/>
  767. <span class="method-name"><a href="../sloodle/SloodleModule.html#methodSloodleModule">SloodleModule::SloodleModule()</a></span><br>
  768. <img src="../media/images/Method.png" alt=" "/>
  769. <span class="method-name"><a href="../sloodle/SloodleModule.html#methodget_course_id">SloodleModule::get_course_id()</a></span><br>
  770. <img src="../media/images/Method.png" alt=" "/>
  771. <span class="method-name"><a href="../sloodle/SloodleModule.html#methodget_creation_time">SloodleModule::get_creation_time()</a></span><br>
  772. <img src="../media/images/Method.png" alt=" "/>
  773. <span class="method-name"><a href="../sloodle/SloodleModule.html#methodget_intro">SloodleModule::get_intro()</a></span><br>
  774. <img src="../media/images/Method.png" alt=" "/>
  775. <span class="method-name"><a href="../sloodle/SloodleModule.html#methodget_modification_time">SloodleModule::get_modification_time()</a></span><br>
  776. <img src="../media/images/Method.png" alt=" "/>
  777. <span class="method-name"><a href="../sloodle/SloodleModule.html#methodget_name">SloodleModule::get_name()</a></span><br>
  778. <img src="../media/images/Method.png" alt=" "/>
  779. <span class="method-name"><a href="../sloodle/SloodleModule.html#methodget_type">SloodleModule::get_type()</a></span><br>
  780. <img src="../media/images/Method.png" alt=" "/>
  781. <span class="method-name"><a href="../sloodle/SloodleModule.html#methodget_type_full">SloodleModule::get_type_full()</a></span><br>
  782. <img src="../media/images/Method.png" alt=" "/>
  783. <span class="method-name"><a href="../sloodle/SloodleModule.html#methodload">SloodleModule::load()</a></span><br>
  784. </blockquote>
  785. </div>
  786. </div>
  787. <p class="notes" id="credit">
  788. Documentation generated on Fri, 17 Jul 2009 11:01:58 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
  789. </p>
  790. </div></body>
  791. </html>