<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3AQuiz_web_services</id>
	<title>Development:Quiz web services - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Development%3AQuiz_web_services"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:Quiz_web_services&amp;action=history"/>
	<updated>2026-05-07T23:21:36Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:Quiz_web_services&amp;diff=11744&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:Quiz_web_services&amp;diff=11744&amp;oldid=prev"/>
		<updated>2024-10-21T08:53:05Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 08:53, 21 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Development:Quiz_web_services&amp;diff=11743&amp;oldid=prev</id>
		<title>1&gt;Seldaek в 07:55, 25 июля 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Development:Quiz_web_services&amp;diff=11743&amp;oldid=prev"/>
		<updated>2008-07-25T07:55:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Comments ? Please join the [http://moodle.org/mod/forum/discuss.php?d=101995 discussion topic in the forum].&lt;br /&gt;
&lt;br /&gt;
== Summary / Purpose ==&lt;br /&gt;
&lt;br /&gt;
The Quiz web services would allow an external application to retrieve some quiz&amp;#039;s questions (and attempt(s) optionally) for an user. The original idea behind this is to be able to build a flash application that would build the quiz dynamically depending on what data moodle sends it, however it might have other applications, since it would allow any application to request questions from moodle in any export format available.&lt;br /&gt;
&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;get_quiz(format, quiz_id [, summary_view ])&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* returns a quiz with all questions&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;get_quizzes_by_course(format, course_id)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* returns an array of quizzes in summary view (only an array of question ids/title and not all the questions)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;get_question(format, question_id)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* returns a question&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;get_questions_by_course(format, course_id [, summary_view ])&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* returns all questions for the given course, with all details or only titles if summary is true&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;get_questions_by_quiz(format, quiz_id [, load_attempt [, user_id [, summary_view ]]])&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* returns all questions for the given quiz, with all details or only titles if summary is true&lt;br /&gt;
* user attempt (if set to -1 -&amp;gt; last attempt, if set to a positive integer -&amp;gt; attempt based on that id, 0 = don&amp;#039;t load) is loaded and overrides default values for questions&lt;br /&gt;
* user attempt is loaded for the currently authenticated user, or the given user id (if authenticated as admin only)&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;get_questions_by_category(format, category_id [, summary_view ])&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* returns all questions for the given category, with all details or only titles if summary is true&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;get_category(format, id)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* returns one category with all details (is this useful?)&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;get_categories_by_course(format, course_id)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* returns all categories for the given course&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;get_categories_by_quiz(format, quiz_id)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* returns all categories for the given quiz&lt;br /&gt;
&lt;br /&gt;
== Security Concerns ==&lt;br /&gt;
&lt;br /&gt;
Access to answers should be restricted to the current user, otherwise someone could gain access to answers of other people, which would allow cheating and possible access to answers that contain private data. &lt;br /&gt;
&lt;br /&gt;
Therefore, unless someone can be authenticated as an admin, he probably shouldn&amp;#039;t have access to any attempt except his, and if the user has no authentication whatsoever, I am not sure what should happen ? Is it okay to send the question data ? I guess that depends on the context.&lt;br /&gt;
&lt;br /&gt;
I am not certain how authentication is handled at the moment in other web services, I guess it can be a problem depending on where the request is coming from.. I know that with flash it is not a problem because if the browser has a cookie for your domain, it will send it with the request and moodle can authentify the user with that.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
* I am not sure whether this should reside within /mod/quiz or /questions, since it uses a bit of both.&lt;br /&gt;
* The export format, which is a parameter in the API, would ideally be one of the various export format that questions support. In our case we need IMS QTI2, and that standard can handle &amp;quot;attempts&amp;quot; data, but I&amp;#039;m not sure about other formats, nor if we should re-use the questions&amp;#039;s export formats or just build new ones from scratch to support all of this, since the question stuff doesn&amp;#039;t support attempts and we can&amp;#039;t really modify it to do so because questions are exported without attempts data in moodle&amp;#039;s admin section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments ? Please join the [http://moodle.org/mod/forum/discuss.php?d=101995 discussion topic in the forum].&lt;/div&gt;</summary>
		<author><name>1&gt;Seldaek</name></author>
	</entry>
</feed>