(**** * The publish test module contains the objects that define a * pubished test and the operation to submit the published test to the * testing server. *) --module Publish; --export Publish; object PublishOptions is components: Title and TestType and QuestionsPerPage and LockScreen and ImmediateFeedback; description: (* These are the options that are merged with an OriginalTest to create a PublishedTest which the server can understand and serve to students. *); end PublishOptions; object TestType is components: IsSecure or IsProctored or IsPractice; description: (* Three radio button options for the type of test being published *); end TestType; object PublishedTest inherits from OriginalTest is components: PublishOptions; description: (* This is the output of the PublishTest operation. *); end PublishedTest; object Title is string; object QuestionsPerPage is integer description: (* Defines the number of questions that the student can answer on a single screen. *); end QuestionsPerPage; object LockScreen is boolean description:(* Determines if the the student can access any outside applications while taking the test. *); end LockScreen; object ImmediateFeedback is boolean description: (* Determines if feedback is provdided to students immediately upon completing the test. *); end ImmediateFeedback; object IsSecure is boolean; object IsProctored is boolean; object IsPractice is boolean; operation PublishTest is inputs: ot:OriginalTest, pos:PublishOptions; outputs: pt:PublishedTest; precondition: (* TODO *); postcondition: (* TODO *); description: (* This operation merges an OrginalTest with the selected PublishOptions to create a PublishedTest that is uploaded to the testing server. *); end PublishTest; --end Publish;