Package xtc.typical

Examples of xtc.typical.Tuple$T1


       
    }
   
    public static void testWriteToZip()
    {
        ManifestResource res = new ManifestResource("123", "Example quiz");
        Manifest man = new Manifest("D2L_321", res);
        ZipWriter<Manifest> writer = new ZipWriter<Manifest>(EXAMPLE_WRITE_ZIP, Manifest.class);
        writer.writeObjectToXML(man);
        System.out.println("Done");
    }
View Full Code Here


        Manifest man = manReader.getObjectFromXML(Manifest.FILE_NAME);
        manReader.closeStreams();//make sure to close the streams before continuing
       
        List<ManifestResource> manRes = man.getResources();//All the ManifestResources within a imsmanifest.xml specified by <resource> tag
        String quizFiles[] = new String[manRes.size()];//Will hold the name of the quiz Xml files within the zip
        Quiz quizzes[] = new Quiz[manRes.size()];//Holds the Quiz objects
        for(int i = 0; i < quizFiles.length; i++)
        {
            quizFiles[i] = manRes.get(i).getHref();//Get the fileNames contained within the zip
            quizzes[i] = quizReader.getObjectFromXML(quizFiles[i]);//Get an instance of the Quiz
            System.out.println("The title of Quiz " + (i + 1) + " is: " + quizzes[i].getAssessment().getTitle());//Print out the title of the Quiz
View Full Code Here

             ZipReader<Manifest> reader = new ZipReader<>(zipFile,Manifest.class);
             Manifest manifest = reader.getObjectFromXML(Manifest.FILE_NAME);
             String quizFile = manifest.getResources().get(0).getHref();
            
             ZipReader<Quiz> quizReader = new ZipReader<>(zipFile, Quiz.class);
             Quiz quiz = quizReader.getObjectFromXML(quizFile);
             showQuizOptions(quiz);
         }
    }
View Full Code Here

            return "Enabled";
    }
    //TODO add time handling methods using new DateUtil class
    public static DateUtil getStartDate(Quiz quiz)
    {
        Timestamp t = quiz.getAssessment().getExtension().getStartDate().getTimeStamp();
        try
        {
            DateUtil d = new DateUtil(t);
            return d;
        }
View Full Code Here

        }
    }
   
    public static DateUtil getEndDate(Quiz quiz)
    {
        Timestamp t = quiz.getAssessment().getExtension().getEndDate().getTimeStamp();
        try
        {
            DateUtil d = new DateUtil(t);
            return d;
        }
View Full Code Here

     * @param quiz The Quiz instance
     * @return whether the quiz is active
     */
    public static String getActive(Quiz quiz)
    {
        Procextension p = quiz.getAssessment().getExtension();
        if(p.getIsActive().equals("no")) {
            return "Disabled";
        }
        else
            return "Enabled";
    }
View Full Code Here

        }
    }
   
    public static String getPassword(Quiz quiz)
    {
        Procextension p = quiz.getAssessment().getExtension();
        return p.getPassword();
    }
View Full Code Here

        return p.getPassword();
    }
   
    public static String getTimeLimit(Quiz quiz)
    {
        Procextension p = quiz.getAssessment().getExtension();
        return Integer.toString(p.getTimeLimit());
    }
View Full Code Here

        return Integer.toString(p.getTimeLimit());
    }
   
    public static boolean isTimeEnforced(Quiz quiz)
    {
        Procextension p = quiz.getAssessment().getExtension();       
        return (p.getEnforceTimeLimit().equals("no"))? false : true;
    }
View Full Code Here

        return (p.getEnforceTimeLimit().equals("no"))? false : true;
    }
   
    public static String getAttempsAllowed(Quiz quiz)
    {
        Procextension p = quiz.getAssessment().getExtension();
        return Integer.toString(p.getAttemptsAllowed());
    }
View Full Code Here

TOP

Related Classes of xtc.typical.Tuple$T1

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.