Progress on bugfixes and Minetest interfaces, but processes are still not completing
This commit is contained in:
@@ -78,6 +78,12 @@ function modpol.interactions.org_dashboard(user, org_name)
|
||||
active = '*'
|
||||
end
|
||||
end
|
||||
local req_str = "[" .. v.id .. "] " ..
|
||||
active .. this_request.type
|
||||
if this_request.params[1] then
|
||||
req_str = req_str ": " ..
|
||||
table.concat(this_request.params, ", ")
|
||||
end
|
||||
local req_str = v.id .. " (" .. this_request.type .. " -> " .. table.concat(this_request.params, ", ") .. ")" .. active
|
||||
table.insert(processes, req_str)
|
||||
end
|
||||
@@ -95,6 +101,13 @@ function modpol.interactions.org_dashboard(user, org_name)
|
||||
process:interact(user)
|
||||
end
|
||||
|
||||
-- Function: modpol.interactions.policy_dashboard
|
||||
-- input: user (string), org_id (int), policy (string)
|
||||
-- if policy is nil, enables creating a new policy
|
||||
-- output: opens a dashboard for viewing/editing policy details
|
||||
-- TODO
|
||||
|
||||
|
||||
-- Function: modpol.interactions.message
|
||||
-- input: user (string), message (string)
|
||||
-- output: prints message to CLI
|
||||
|
||||
@@ -40,10 +40,11 @@ end
|
||||
|
||||
-- ============================
|
||||
-- interact function for the consent module
|
||||
-- input: user (string)
|
||||
function modpol.modules.consent:interact(user)
|
||||
-- TODO this needs more context on the vote at hand
|
||||
modpol.interactions.binary_poll_user(
|
||||
user, "How do you vote?",
|
||||
user, "Do you consent?",
|
||||
function(vote)
|
||||
if vote == 'yes' then
|
||||
self:approve(user, true)
|
||||
|
||||
@@ -101,15 +101,15 @@ function modpol.orgs.init_instance()
|
||||
|
||||
local instance = temp_org()
|
||||
instance.id = 1
|
||||
instance.name = "instance"
|
||||
instance.name = "root"
|
||||
|
||||
setmetatable(instance, modpol.orgs)
|
||||
|
||||
-- adding instance to org list
|
||||
modpol.orgs.array[1] = instance
|
||||
|
||||
modpol.ocutil.log('Initialized the instance org')
|
||||
modpol.orgs:record('Initialized the instance org', 'create_instance')
|
||||
modpol.ocutil.log('Initialized the instance root org')
|
||||
modpol.orgs:record('Initialized the instance root org', 'create_instance')
|
||||
|
||||
return instance
|
||||
end
|
||||
@@ -153,6 +153,7 @@ end
|
||||
|
||||
-- ==================================================
|
||||
-- adds a new sub org to the org it is called on
|
||||
-- input: name (string), user (string)
|
||||
-- ex: instance:add_org('town hall')
|
||||
function modpol.orgs:add_org(name, user)
|
||||
if self.id == nil then
|
||||
@@ -176,6 +177,7 @@ function modpol.orgs:add_org(name, user)
|
||||
child_org.id = modpol.orgs.count
|
||||
child_org.name = name
|
||||
child_org.parent = self.id
|
||||
child_org.processes = self.processes
|
||||
|
||||
setmetatable(child_org, modpol.orgs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user