Commit 9e7258d8 by Vasyl Nakvasiuk

fix rakefile, fix docs

parent be27dfd5
......@@ -22,12 +22,12 @@ The main container for a single instance of Conditional module. The following at
be specified for this tag::
sources - location id of required modules, separated by ';'
message - message for case, where one or more are not passed. Here you can use variable {link}, which generate link to required module.
[message | ""] - message for case, where one or more are not passed. Here you can use variable {link}, which generate link to required module.
completed - map to `is_completed` module method
attempted - map to `is_attempted` module method
poll_answer - map to `poll_answer` module attribute
voted - map to `voted` module attribute
[completed] - map to `is_completed` module method
[attempted] - map to `is_attempted` module method
[poll_answer] - map to `poll_answer` module attribute
[voted] - map to `voted` module attribute
show tag
--------
......@@ -47,9 +47,9 @@ Examples of conditional depends on poll
<conditional sources="i4x://MITx/0.000x/poll_question/first_real_poll_seq_with_reset" poll_answer="man"
message="{link} must be answered for this to become visible.">
<html>
<h2>You see this, cause your vote value for "First question" was "man"</h2>
</html>
<html>
<h2>You see this, cause your vote value for "First question" was "man"</h2>
</html>
</conditional>
Examples of conditional depends on poll (use <show> tag)
......@@ -59,9 +59,9 @@ Examples of conditional depends on poll (use <show> tag)
<conditional sources="i4x://MITx/0.000x/poll_question/first_real_poll_seq_with_reset" poll_answer="man"
message="{link} must be answered for this to become visible.">
<html>
<show sources="i4x://MITx/0.000x/problem/test_1; i4x://MITx/0.000x/Video/Avi_resources; i4x://MITx/0.000x/problem/test_1"/>
</html>
<html>
<show sources="i4x://MITx/0.000x/problem/test_1; i4x://MITx/0.000x/Video/Avi_resources; i4x://MITx/0.000x/problem/test_1"/>
</html>
</conditional>
Examples of conditional depends on problem
......
......@@ -22,9 +22,9 @@ poll_question tag
Xmodule for creating poll functionality - voting system. The following attributes can
be specified for this tag::
name - Name
display_name - Display name
reset - Can reset/revote many time (value = True/False)
name - Name of xmodule.
[display_name| AUTOGENERATE] - Display name of xmodule. When this attribute is not defined - display name autogenerate with some hash.
[reset | False] - Can reset/revote many time (value = True/False)
answer tag
......
......@@ -487,60 +487,55 @@ task :autodeploy_properties do
end
end
# --- Develop documentation ---
desc "Invoke sphinx 'make build' to generate docs."
task :builddocs do
Dir.chdir('docs') do
sh('make html')
end
end
desc "Show docs in browser (mac and ubuntu)."
task :showdocs do
Dir.chdir('docs/build/html') do
if RUBY_PLATFORM.include? 'darwin' # mac os
sh('open index.html')
elsif RUBY_PLATFORM.include? 'linux' # make more ubuntu specific?
sh('sensible-browser index.html') # ubuntu
else
raise "\nUndefined how to run browser on your machine.
Please use 'rake builddocs' and then manually open
'mitx/docs/build/html/index.html."
end
task :tst, [:options] do |t, args|
puts args.options
if args.options == 'pub'
path = "doc/public"
else
path = "docs"
end
end
desc "Build docs and show them in browser"
task :doc => :builddocs do
Rake::Task["showdocs"].invoke
puts vvv
end
# --- Develop documentation ---
# --- Public documentation ---
# --- Develop and public documentation ---
desc "Invoke sphinx 'make build' to generate docs."
task :buildpubdocs do
Dir.chdir('doc/public') do
task :builddocs, [:options] do |t, args|
if args.options == 'pub'
path = "doc/public"
else
path = "docs"
end
Dir.chdir(path) do
sh('make html')
end
end
desc "Show docs in browser (mac and ubuntu)."
task :showpubdocs do
Dir.chdir('doc/public/build/html') do
task :showdocs, [:options] do |t, args|
if args.options == 'pub'
path = "doc/public"
else
path = "docs"
end
Dir.chdir("#{path}/build/html") do
if RUBY_PLATFORM.include? 'darwin' # mac os
sh('open index.html')
elsif RUBY_PLATFORM.include? 'linux' # make more ubuntu specific?
sh('sensible-browser index.html') # ubuntu
else
raise "\nUndefined how to run browser on your machine.
Please use 'rake showpubdocs' and then manually open
'mitx/doc/public/build/html/index.html."
Please use 'rake builddocs' and then manually open
'mitx/#{path}/build/html/index.html."
end
end
end
desc "Build docs and show them in browser"
task :pubdoc => :buildpubdocs do
Rake::Task["showpubdocs"].invoke
task :doc, [:options] => :builddocs do |t, args|
Rake::Task["showdocs"].invoke(args.options)
end
# --- Public documentation ---
# --- Develop and public documentation ---
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment