<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zhu6</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zhu6"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Zhu6"/>
	<updated>2026-08-12T18:49:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102504</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102504"/>
		<updated>2016-09-09T04:32:17Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [https://en.wikipedia.org/wiki/Machine_learning_algorithms machine learning algorithms], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [https://en.wikipedia.org/wiki/R_(programming_language) R] and [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [https://en.wikipedia.org/wiki/Microsoft_Azure#Cloud_services Azure Cloud] as a scalable and [https://en.wikipedia.org/wiki/Fault_tolerance fault-tolerant] [https://en.wikipedia.org/wiki/Web_service web service] using Azure's Machine Learning [https://en.wikipedia.org/wiki/Application_programming_interface API]. The web service created by Machine Learning API are nothing but [https://en.wikipedia.org/wiki/Representational_state_transfer REST] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [https://en.wikipedia.org/wiki/Relational_database relational data] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [https://en.wikipedia.org/wiki/Apache_Hadoop Hadoop] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [https://en.wikipedia.org/wiki/Supervised_learning supervised learning] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [https://en.wikipedia.org/wiki/Logistic_regression logistic regression model] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/AWS_S3 AWS S3] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/AWS_S3 HTTPS] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [https://docs.treasuredata.com/articles/hive HiveQL]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[https://en.wikipedia.org/wiki/CSV_file CSV file]&lt;br /&gt;
[https://en.wikipedia.org/wiki/Amazon_S3 S3] and [https://en.wikipedia.org/wiki/Amazon_Redshift Redshift] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/JSON JSON]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Zip_(file_format) zip] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTTP_request HTTP request]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Data_type Data types]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Data_visualization Data visualization]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Feature_extraction Feature extraction|Feature normalization]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [https://en.wikipedia.org/wiki/Principal_component_analysis PCA]&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Orthonormalization Orthonormalization]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Imputation_(statistics) Missing value imputation]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Amazon_Web_ServicesAWS 3]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102503</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102503"/>
		<updated>2016-09-09T04:31:50Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [https://en.wikipedia.org/wiki/Machine_learning_algorithms machine learning algorithms], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [https://en.wikipedia.org/wiki/R_(programming_language) R] and [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [https://en.wikipedia.org/wiki/Microsoft_Azure#Cloud_services Azure Cloud] as a scalable and [https://en.wikipedia.org/wiki/Fault_tolerance fault-tolerant] [https://en.wikipedia.org/wiki/Web_service web service] using Azure's Machine Learning [https://en.wikipedia.org/wiki/Application_programming_interface API]. The web service created by Machine Learning API are nothing but [https://en.wikipedia.org/wiki/Representational_state_transfer REST] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [https://en.wikipedia.org/wiki/Relational_database relational data] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [https://en.wikipedia.org/wiki/Apache_Hadoop Hadoop] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [https://en.wikipedia.org/wiki/Supervised_learning supervised learning] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [https://en.wikipedia.org/wiki/Logistic_regression logistic regression model] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/AWS_S3 AWS S3] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/AWS_S3 HTTPS] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [https://docs.treasuredata.com/articles/hive HiveQL]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[https://en.wikipedia.org/wiki/CSV_file CSV file]&lt;br /&gt;
[https://en.wikipedia.org/wiki/Amazon_S3 S3] and [https://en.wikipedia.org/wiki/Amazon_Redshift Redshift] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/JSON JSON]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Zip_(file_format) zip] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[https://en.wikipedia.org/wiki/HTTP_request HTTP request]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Data_type Data types]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Data_visualization Data visualization]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Feature_extraction Feature extraction|Feature normalization]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [https://en.wikipedia.org/wiki/Principal_component_analysis PCA]&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Orthonormalization Orthonormalization]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[https://en.wikipedia.org/wiki/Imputation_(statistics) Missing value imputation]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102502</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102502"/>
		<updated>2016-09-09T04:28:30Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [https://en.wikipedia.org/wiki/Machine_learning_algorithms machine learning algorithms], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [https://en.wikipedia.org/wiki/R_(programming_language) R] and [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [https://en.wikipedia.org/wiki/Microsoft_Azure#Cloud_services Azure Cloud] as a scalable and [https://en.wikipedia.org/wiki/Fault_tolerance fault-tolerant] [https://en.wikipedia.org/wiki/Web_service web service] using Azure's Machine Learning [https://en.wikipedia.org/wiki/Application_programming_interface API]. The web service created by Machine Learning API are nothing but [https://en.wikipedia.org/wiki/Representational_state_transfer REST] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [https://en.wikipedia.org/wiki/Relational_database relational data] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [https://en.wikipedia.org/wiki/Apache_Hadoop Hadoop] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [https://en.wikipedia.org/wiki/Supervised_learning supervised learning] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [https://en.wikipedia.org/wiki/Logistic_regression logistic regression model] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/AWS_S3 AWS S3] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102501</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102501"/>
		<updated>2016-09-09T04:27:50Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Azure Marketplace */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [https://en.wikipedia.org/wiki/Machine_learning_algorithms machine learning algorithms], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [https://en.wikipedia.org/wiki/R_(programming_language) R] and [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [https://en.wikipedia.org/wiki/Microsoft_Azure#Cloud_services Azure Cloud] as a scalable and [https://en.wikipedia.org/wiki/Fault_tolerance fault-tolerant] [https://en.wikipedia.org/wiki/Web_service web service] using Azure's Machine Learning [https://en.wikipedia.org/wiki/Application_programming_interface API]. The web service created by Machine Learning API are nothing but [https://en.wikipedia.org/wiki/Representational_state_transfer REST] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [https://en.wikipedia.org/wiki/Relational_database relational data] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [https://en.wikipedia.org/wiki/Apache_Hadoop Hadoop] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [https://en.wikipedia.org/wiki/Supervised_learning supervised learning] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [https://en.wikipedia.org/wiki/Logistic_regression logistic regression model] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102500</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102500"/>
		<updated>2016-09-09T04:27:16Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Azure Machine Learning Studio */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [https://en.wikipedia.org/wiki/Machine_learning_algorithms machine learning algorithms], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [https://en.wikipedia.org/wiki/R_(programming_language) R] and [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [https://en.wikipedia.org/wiki/Microsoft_Azure#Cloud_services Azure Cloud] as a scalable and [https://en.wikipedia.org/wiki/Fault_tolerance fault-tolerant] [https://en.wikipedia.org/wiki/Web_service web service] using Azure's Machine Learning [https://en.wikipedia.org/wiki/Application_programming_interface API]. The web service created by Machine Learning API are nothing but [https://en.wikipedia.org/wiki/Representational_state_transfer REST] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [https://en.wikipedia.org/wiki/Relational_database relational data] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [https://en.wikipedia.org/wiki/Apache_Hadoop Hadoop] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [https://en.wikipedia.org/wiki/Supervised_learning supervised learning] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [[Logistic regression|logistic regression model]] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102499</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102499"/>
		<updated>2016-09-09T04:26:51Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Build and deploy machine learning models in Azure Machine Learning */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [https://en.wikipedia.org/wiki/Machine_learning_algorithms machine learning algorithms], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [https://en.wikipedia.org/wiki/R_(programming_language) R] and [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [https://en.wikipedia.org/wiki/Microsoft_Azure#Cloud_services Azure Cloud] as a scalable and [https://en.wikipedia.org/wiki/Fault_tolerance fault-tolerant] [https://en.wikipedia.org/wiki/Web_service web service] using Azure's Machine Learning [https://en.wikipedia.org/wiki/Application_programming_interface API]. The web service created by Machine Learning API are nothing but [https://en.wikipedia.org/wiki/Representational_state_transfer REST] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [https://en.wikipedia.org/wiki/Relational_database relational data] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [https://en.wikipedia.org/wiki/Apache_Hadoop Hadoop] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [https://en.wikipedia.org/wiki/Supervised_learning supervised learning] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [[predictive analytics]] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [[Logistic regression|logistic regression model]] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102498</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102498"/>
		<updated>2016-09-09T04:26:23Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Data Collection &amp;amp; Management */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [https://en.wikipedia.org/wiki/Machine_learning_algorithms machine learning algorithms], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [https://en.wikipedia.org/wiki/R_(programming_language) R] and [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [https://en.wikipedia.org/wiki/Microsoft_Azure#Cloud_services Azure Cloud] as a scalable and [https://en.wikipedia.org/wiki/Fault_tolerance fault-tolerant] [https://en.wikipedia.org/wiki/Web_service web service] using Azure's Machine Learning [https://en.wikipedia.org/wiki/Application_programming_interface API]. The web service created by Machine Learning API are nothing but [https://en.wikipedia.org/wiki/Representational_state_transfer REST] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [https://en.wikipedia.org/wiki/Relational_database relational data] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [https://en.wikipedia.org/wiki/Apache_Hadoop Hadoop] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [[supervised learning]] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [[predictive analytics]] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [[Logistic regression|logistic regression model]] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102497</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102497"/>
		<updated>2016-09-09T04:25:38Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [https://en.wikipedia.org/wiki/Machine_learning_algorithms machine learning algorithms], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [https://en.wikipedia.org/wiki/R_(programming_language) R] and [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [https://en.wikipedia.org/wiki/Microsoft_Azure#Cloud_services Azure Cloud] as a scalable and [https://en.wikipedia.org/wiki/Fault_tolerance fault-tolerant] [https://en.wikipedia.org/wiki/Web_service web service] using Azure's Machine Learning [https://en.wikipedia.org/wiki/Application_programming_interface API]. The web service created by Machine Learning API are nothing but [https://en.wikipedia.org/wiki/Representational_state_transfer REST] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [[Relational database|relational data]] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [[Apache Hadoop|Hadoop]] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [[supervised learning]] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [[predictive analytics]] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [[Logistic regression|logistic regression model]] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102496</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102496"/>
		<updated>2016-09-09T04:25:17Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [https://en.wikipedia.org/wiki/Machine_learning_algorithms machine learning algorithms], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [https://en.wikipedia.org/wiki/R_(programming_language) R] and [https://en.wikipedia.org/wiki/Python_(programming_language) Python] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [https://en.wikipedia.org/wiki/Microsoft_Azure#Cloud_services Azure Cloud] as a scalable and [https://en.wikipedia.org/wiki/Fault_tolerance fault-tolerant] [https://en.wikipedia.org/wiki/Web_service web service] using Azure's Machine Learning [https://en.wikipedia.org/wiki/Application_programming_interface API]. The web service created by Machine Learning API are nothing but [[Representational state transfer|REST]] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [[Relational database|relational data]] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [[Apache Hadoop|Hadoop]] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [[supervised learning]] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [[predictive analytics]] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [[Logistic regression|logistic regression model]] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102495</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102495"/>
		<updated>2016-09-09T04:22:53Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [[machine learning algorithms]], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [[R (programming language)|R]] and [[Python (programming language)|Python]] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [[Microsoft Azure#Cloud services|Azure Cloud]] as a scalable and [[Fault tolerance|fault-tolerant]] [[web service]] using Azure's Machine Learning [[Application programming interface|API]]. The web service created by Machine Learning API are nothing but [[Representational state transfer|REST]] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [[Relational database|relational data]] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [[Apache Hadoop|Hadoop]] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [[supervised learning]] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [[predictive analytics]] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [[Logistic regression|logistic regression model]] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102494</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102494"/>
		<updated>2016-09-09T04:21:58Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [[machine learning algorithms]], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [[R (programming language)|R]] and [[Python (programming language)|Python]] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [[Microsoft Azure#Cloud services|Azure Cloud]] as a scalable and [[Fault tolerance|fault-tolerant]] [[web service]] using Azure's Machine Learning [[Application programming interface|API]]. The web service created by Machine Learning API are nothing but [[Representational state transfer|REST]] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [[Relational database|relational data]] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [[Apache Hadoop|Hadoop]] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [[supervised learning]] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [[predictive analytics]] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;[&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;]&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [[Logistic regression|logistic regression model]] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102493</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102493"/>
		<updated>2016-09-09T04:21:26Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [[machine learning algorithms]], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [[R (programming language)|R]] and [[Python (programming language)|Python]] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [[Microsoft Azure#Cloud services|Azure Cloud]] as a scalable and [[Fault tolerance|fault-tolerant]] [[web service]] using Azure's Machine Learning [[Application programming interface|API]]. The web service created by Machine Learning API are nothing but [[Representational state transfer|REST]] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [[Relational database|relational data]] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [[Apache Hadoop|Hadoop]] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [[supervised learning]] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [[predictive analytics]] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;[isbn = 978-1-4842-0446-7 &amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;]&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [[Logistic regression|logistic regression model]] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102492</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102492"/>
		<updated>2016-09-09T04:20:59Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [https://en.wikipedia.org/wiki/Cloud_computing cloud]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [https://en.wikipedia.org/wiki/Big_data big data] processing including creating, testing, operationalizing and managing [https://en.wikipedia.org/wiki/Predictive_analytics predictive analytics] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;&amp;gt;[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/ &amp;quot;Introduction to machine learning on Microsoft Azure&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [[machine learning algorithms]], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [[R (programming language)|R]] and [[Python (programming language)|Python]] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [[Microsoft Azure#Cloud services|Azure Cloud]] as a scalable and [[Fault tolerance|fault-tolerant]] [[web service]] using Azure's Machine Learning [[Application programming interface|API]]. The web service created by Machine Learning API are nothing but [[Representational state transfer|REST]] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [[Relational database|relational data]] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [[Apache Hadoop|Hadoop]] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [[supervised learning]] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [[predictive analytics]] model. Following are the components of the Machine Learning Studio:&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;&amp;gt;[isbn = 978-1-4842-0446-7 &amp;quot;Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes&amp;quot;]&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref name=&amp;quot;Cortana Analytics Gallery&amp;quot;&amp;gt;[https://gallery.cortanaanalytics.com/ &amp;quot;Cortana Analytics Gallery&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref name=&amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;&amp;gt;[http://robusttechhouse.com/microsoft-azure-machine-learning-review/ &amp;quot;Microsoft Azure Machine Learning Review - RobustTechHouse&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [[Logistic regression|logistic regression model]] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref name=&amp;quot;Machine Learning as a Service - Benchmark&amp;quot;&amp;gt;[https://blog.onliquid.com/machine-learning-service-benchmark/ &amp;quot;Machine Learning as a Service - Benchmark&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref name=&amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;&amp;gt;[https://aws.amazon.com/s3/ &amp;quot;Amazon Simple Storage Service (S3) - Object Storage&amp;quot;]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102491</id>
		<title>Calibration Assignment Submission (Azure Machine Learning)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Azure_Machine_Learning)&amp;diff=102491"/>
		<updated>2016-09-09T04:13:01Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: Created page with &amp;quot;'''Azure Machine Learning''' (also known as Azure ML) is a fully cloud-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ e...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Azure Machine Learning''' (also known as Azure ML) is a fully [[Cloud computing|cloud]]-based [http://www.sitscommunity360.com/what-does-end-to-end-it-support-actually-mean/ end-to-end service] by Microsoft for [[big data]] processing including creating, testing, operationalizing and managing [[predictive analytics]] models in the cloud. Azure ML is now a part of Microsoft's big data and advanced analytics offering '[https://www.microsoft.com/en-us/server-cloud/cortana-analytics-suite/overview.aspx Cortana Analytics Suite]'.&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;{{Cite web|title = Introduction to machine learning on Microsoft Azure|url = https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-machine-learning/|website = azure.microsoft.com|access-date = 2016-02-06}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Azure ML offers features such as visual composition, large pallet of modules, an extensive library of starting templates and powerful [[machine learning algorithms]], a large collection of built-in transformation tasks, and support for frequently used data science programming languages like [[R (programming language)|R]] and [[Python (programming language)|Python]] which makes building common predictive analytics models quick and easy. After developing the model, one can deploy it on [[Microsoft Azure#Cloud services|Azure Cloud]] as a scalable and [[Fault tolerance|fault-tolerant]] [[web service]] using Azure's Machine Learning [[Application programming interface|API]]. The web service created by Machine Learning API are nothing but [[Representational state transfer|REST]] APIs that allows accessing the model from almost anywhere including web sites and customer applications, As patterns in data change over time, or if the user wants to add some new source of data, the deployed model can be easily retrained and updated programmatically through Azure ML API. Azure ML provides all such facilities through an interactive visual workspace called [https://studio.azureml.net/ Azure Machine Learning Studio.]&amp;lt;ref name=&amp;quot;:0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning workflow==&lt;br /&gt;
&lt;br /&gt;
Azure ML has mainly three components in its workflow to build model and operationalize machine learning solution.&lt;br /&gt;
&lt;br /&gt;
===Data Collection &amp;amp; Management===&lt;br /&gt;
&lt;br /&gt;
It allows to use data through blobs and tables ([https://azure.microsoft.com/en-us/services/storage/ Azure Storage]), [[Relational database|relational data]] ([https://azure.microsoft.com/en-us/services/sql-database/ Azure SQL Database]), [[Apache Hadoop|Hadoop]] ([https://azure.microsoft.com/en-us/services/hdinsight/ Azure HDInsight]) and massive data stores ([https://azure.microsoft.com/en-us/solutions/data-lake/ Azure Data Lake]).&lt;br /&gt;
&lt;br /&gt;
===Machine Learning Service=== &lt;br /&gt;
&lt;br /&gt;
It allows to create Machine learning models through ML Studio web apps and output a web service that can run on a scheduled basis.&lt;br /&gt;
&lt;br /&gt;
===Embedded ML Model===&lt;br /&gt;
&lt;br /&gt;
It allows to embed the developed machine learning models into other applications such as apps, websites or business intelligence tools.&lt;br /&gt;
&lt;br /&gt;
===Build and deploy machine learning models in Azure Machine Learning===&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning has many different modules to help you build and deploy machine learning models in production. Following are the key steps to build and deploy a machine learning model in Azure&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;&lt;br /&gt;
# Import raw data&lt;br /&gt;
# Preprocess the data&lt;br /&gt;
# Do feature engineering and data labeling (for [[supervised learning]] such as classification)&lt;br /&gt;
# Train, score, and evaluate the model&lt;br /&gt;
# Model comparison and selection&lt;br /&gt;
# Save the trained model&lt;br /&gt;
# Create a predictive experiment&lt;br /&gt;
# Publish the web service in Azure Machine Learning&lt;br /&gt;
&lt;br /&gt;
==Azure Machine Learning Studio==&lt;br /&gt;
&lt;br /&gt;
[https://azure.microsoft.com/en-us/documentation/articles/machine-learning-what-is-ml-studio/ Azure Machine Learning Studio] is an interactive, visual workspace to build, test, and iterate on a [[predictive analytics]] model. Following are the components of the Machine Learning Studio:&amp;lt;ref name=&amp;quot;:1&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Experiments===&lt;br /&gt;
It provides a list of experiments that have been created, run, and saved as drafts. It also includes a set of sample experiments to help jumpstart the projects.&lt;br /&gt;
&lt;br /&gt;
===Web Services===&lt;br /&gt;
It provides a list of experiments that are already published by the user. If no experiments have been published, this list will be empty.&lt;br /&gt;
&lt;br /&gt;
===Datasets===&lt;br /&gt;
It provides a list of sample datasets that ship with the product along with datasets uploaded by the user.&lt;br /&gt;
&lt;br /&gt;
===Trained Models===&lt;br /&gt;
It provides a list of any trained models that the user has saved from experiments.&lt;br /&gt;
&lt;br /&gt;
===Settings===&lt;br /&gt;
It includes a collection of settings so as to configure resources and account.&lt;br /&gt;
&lt;br /&gt;
In Machine Learning Studio, the user can construct a predictive model by dragging and dropping datasets and analysis modules onto the interactive canvas, connecting them together with lines to show the flow of data and parameters through the workflow to form an experiment, which can be run in ML Studio. Thus, each experiment is complete workflow with all components required to build, test, and evaluate a predictive analytics model. One can iteratively update the model design by editing the experiment, saving the copy and running it again.&lt;br /&gt;
&lt;br /&gt;
==Cortana Analytics Gallery==&lt;br /&gt;
&lt;br /&gt;
Cortana Analytics [https://gallery.cortanaanalytics.com/ (formerly called as Machine Learning Gallery)] provides a gallery of sample machine learning models that one can use to quickly get started. Each model contains an experiment added by Microsoft, its partners or individual data scientists. &amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;{{Cite book|title = Predictive Analytics with Microsoft Azure Machine Learning: Build and Deploy Actionable Solutions in Minutes|last = |first = |publisher = |year = |isbn = 978-1-4842-0446-7|location = |pages = }}&amp;lt;/ref&amp;gt; It also serves as a platform for users looking to learn from others, to get started developing their own solutions, or to contribute their own work to the advanced analytics community&amp;lt;ref&amp;gt;{{Cite web|title = Cortana Analytics Gallery|url = https://gallery.cortanaanalytics.com/|website = gallery.cortanaanalytics.com|access-date = 2016-02-16}}&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Azure Marketplace==&lt;br /&gt;
&lt;br /&gt;
Machine Learning Studio enables a user to configure Machine Learning models using graphical user interfaces. [https://azure.microsoft.com/en-us/marketplace/ Azure Marketplace], on the other hand, offers pre-packaged models that are ready to use. Some of the services that the Marketplace has to offer are listed below:&amp;lt;ref&amp;gt;{{Cite web|title = Microsoft Azure Machine Learning Review - RobustTechHouse|url = http://robusttechhouse.com/microsoft-azure-machine-learning-review/|website = RobustTechHouse|access-date = 2016-02-05|language = en-US}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/text-analytics Text Analytics]&lt;br /&gt;
&lt;br /&gt;
The Text Analytics API is a suite of text analytics services built using Azure Machine Learning. It can be used to detect sentiments, extract keyphrases and detect the language of the text provided.&lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/amla/mba Frequently brought together]&lt;br /&gt;
&lt;br /&gt;
This API can be used by website owners to help its customers discover items in its catalog that are bought together. It uses customer purchase history to provide &amp;quot;Frequently bought together&amp;quot; recommendations. &lt;br /&gt;
&lt;br /&gt;
[https://datamarket.azure.com/dataset/aml_labs/log_regression Binary classifier API]&lt;br /&gt;
&lt;br /&gt;
Binary Classifier API is an example built with Microsoft Azure Machine Learning that fits a [[Logistic regression|logistic regression model]] to data input by the user and then outputs the predicted value for each of the observations in the data.  &lt;br /&gt;
&lt;br /&gt;
==Comparison==&lt;br /&gt;
The summary comparison between various machine learning platforms has been summarized below&amp;lt;ref&amp;gt;{{Cite web|title = Machine Learning as a Service - Benchmark|url = https://blog.onliquid.com/machine-learning-service-benchmark/|website = Liquid|access-date = 2016-02-09}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!AWS machine learning&lt;br /&gt;
!Google Prediction API&lt;br /&gt;
!MS Azure Machine Learning&lt;br /&gt;
|-&lt;br /&gt;
|Data sources&lt;br /&gt;
|Text file uploaded into S3&lt;br /&gt;
[https://aws.amazon.com/rds/ AWS RDS]&lt;br /&gt;
&lt;br /&gt;
[https://aws.amazon.com/redshift/ AWS Redshift]&lt;br /&gt;
&lt;br /&gt;
[[AWS S3]] table &lt;br /&gt;
&lt;br /&gt;
|Text file uploaded into &lt;br /&gt;
Google storage&lt;br /&gt;
&lt;br /&gt;
Google Spreadsheets&lt;br /&gt;
&lt;br /&gt;
[[HTTPS]] requests&lt;br /&gt;
&lt;br /&gt;
API update calls&lt;br /&gt;
|Uploaded text files&lt;br /&gt;
Azure storage &lt;br /&gt;
&lt;br /&gt;
SQL database &lt;br /&gt;
&lt;br /&gt;
Web URL&lt;br /&gt;
&lt;br /&gt;
Hadoop [[HiveQL]]&lt;br /&gt;
|-&lt;br /&gt;
|Data formats&lt;br /&gt;
|[[CSV file]]&lt;br /&gt;
[[Amazon S3|S3]] and [[Amazon Redshift|Redshift]] database&lt;br /&gt;
|Text file&lt;br /&gt;
Spreadsheet&lt;br /&gt;
&lt;br /&gt;
[[JSON]]&lt;br /&gt;
|CSV and text files&lt;br /&gt;
[https://docs.treasuredata.com/articles/hive Hive SQL] tables &lt;br /&gt;
&lt;br /&gt;
[https://msdn.microsoft.com/en-us/data/hh237663.aspx Odata values]&lt;br /&gt;
&lt;br /&gt;
[http://svmlight.joachims.org/ svmlight]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.waikato.ac.nz/ml/weka/arff.html arff]&lt;br /&gt;
&lt;br /&gt;
[[Zip (file format)|zip]] &lt;br /&gt;
&lt;br /&gt;
[http://fileinfo.com/extension/rdata RData]&lt;br /&gt;
|-&lt;br /&gt;
|Dataset maximum size&lt;br /&gt;
|100GB&lt;br /&gt;
|text file: 2.5 GB&lt;br /&gt;
[[HTTP request]]: 2 MB&lt;br /&gt;
|10 GB&lt;br /&gt;
|-&lt;br /&gt;
|[[Data type|Data types]]&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|numeric &lt;br /&gt;
string&lt;br /&gt;
&lt;br /&gt;
|boolean&lt;br /&gt;
categorical&lt;br /&gt;
&lt;br /&gt;
datetime&lt;br /&gt;
&lt;br /&gt;
numeric&lt;br /&gt;
&lt;br /&gt;
timespan&lt;br /&gt;
&lt;br /&gt;
string&lt;br /&gt;
|-&lt;br /&gt;
|[[Data visualization]]&lt;br /&gt;
|yes&lt;br /&gt;
table view&lt;br /&gt;
|no&lt;br /&gt;
|Table, histogram, &lt;br /&gt;
statistical summary&lt;br /&gt;
|-&lt;br /&gt;
|Mathematical transformations&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Feature extraction|Feature normalization]]&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|yes using [[Principal component analysis|PCA]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Orthonormalization]]&lt;br /&gt;
|no&lt;br /&gt;
|no&lt;br /&gt;
|yes&lt;br /&gt;
|-&lt;br /&gt;
|[[Imputation (statistics)|Missing value imputation]]&lt;br /&gt;
|yes indirectly chain feature &lt;br /&gt;
imputation model with main&lt;br /&gt;
&lt;br /&gt;
prediction model&lt;br /&gt;
|yes automatic replaces missing &lt;br /&gt;
strings with &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
replaces missing numbers&lt;br /&gt;
&lt;br /&gt;
with 0&lt;br /&gt;
|yes can replace with custom&lt;br /&gt;
values mean, median or mode.&lt;br /&gt;
|}&lt;br /&gt;
Terms used in the above comparison&lt;br /&gt;
&lt;br /&gt;
[[Amazon Web Services|AWS 3]]: Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage&amp;lt;ref&amp;gt;{{Cite web|title = Amazon Simple Storage Service (S3) - Object Storage|url = https://aws.amazon.com/s3/|website = Amazon Web Services, Inc.|access-date = 2016-02-16}}&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Azure Machine Learning provides more flexibility in terms of the data formats that can be imported into its environment. It also supports more data visualization methods as compared to Amazon Machine Learning. The missing value imputaion can also be customized.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [https://azure.microsoft.com/en-us/documentation/articles/machine-learning-create-experiment/ Tutorial on generating a linear regression model for predicting automobile prices]&lt;br /&gt;
* [http://cloudacademy.com/blog/azure-machine-learning/ CloudAcademy blog]&lt;br /&gt;
* [http://www.kdnuggets.com/2014/11/microsoft-azure-machine-learning.html Why Azure ML is the next big thing in Machine Learning (kdnuggets blog)]&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
* [https://www.youtube.com/watch?v=kZ04LnSjWek Introducing Microsoft Azure Machine Learning(YouTube video)]&lt;br /&gt;
&lt;br /&gt;
* [https://www.youtube.com/watch?v=GPXvtoIAbOg How to train a neural network using Azure Machine Learning]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=102490</id>
		<title>CSC/ECE 517 Spring 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=102490"/>
		<updated>2016-09-09T04:12:41Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Calibration Assignment Submissions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Writing Assignment 1==&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Active Job]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (OmniAuth)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Patch_verb)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Azure_Machine_Learning)]]&lt;br /&gt;
&lt;br /&gt;
==Writing Assignment 2==&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Mozilla Implement HTML5 form validation]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE_517_Spring_2016/Mozilla Conforming Image Loading to HTML 5 Specs]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Functional Tests for Questionnaire Controller]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 / Expertiza Self-Review Feature]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Refactor different question types from quiz feature]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Implement private browsing]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Write automated tests for WebDriver]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Refactor sign_up_sheet_controller.rb and sign_up_topic.rb]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Implement Common Parts of the CSSOM API]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Functional tests for assignment creation function]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/E1604. Functional tests for Calibration function]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Refactor and write unit tests for question type.rb]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016/Refactor response controller]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE_517_Spring_2016_OSS_M1606]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE_517_Spring_2016/OSS_E1601]]&lt;br /&gt;
&lt;br /&gt;
==Final Project Design Document==&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 M1601 Implement HTML5 form validation]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 M1602 Make image loads conform with the spec]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1624 Compose functional tests for Suggest topics of student functionality ]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1631 Team-based reviewing]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1628 Visualization]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1625 Show confidence ratings for grade based on reputations of reviewers]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1629 Performance improvement for Course &amp;amp; Assignment Listing]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 M1603 Implement Common Parts of the CSSOM API]]&lt;br /&gt;
*[[M1606: Implementing HTTP authorization UI and persistent sessions]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1620 Improve Survey Functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2016 E1621 Refactor and Test the Quizzing Feature]]&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Active_Job)&amp;diff=102478</id>
		<title>Calibration Assignment Submission (Active Job)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Active_Job)&amp;diff=102478"/>
		<updated>2016-09-08T19:32:07Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: Created page with &amp;quot;== '''Introduction''' == Active Job is a framework that helps developers to write codes and run them on the background automatically under different scenarios. It’s an interfac...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
Active Job is a framework that helps developers to write codes and run them on the background automatically under different scenarios. It’s an interface that adapts various queueing backends like [https://github.com/nesquena/backburner Backburner], [https://github.com/collectiveidea/delayed_job Delayed Job], [https://github.com/bkeepers/qu Qu] and so on. Jobs can vary from schedule newsletters, follow-up emails to database housekeeping. &amp;lt;ref name= &amp;quot;Active-Job-Basics&amp;quot;&amp;gt;Rails Guides [http://guides.rubyonrails.org/active_job_basics.html “Active Job Basics” ]&amp;lt;/ref&amp;gt; Overall, Active Job is an interface which you can work with common queueing backends. &lt;br /&gt;
The reason to have Active Job in place is to make sure Rails apps can have a job infrastructure. Other existing gems can build on this framework without the limitation of API difference between different job runners such as Delayed Job and Resque. With this feature choosing queueing backends can become an operational concern. Also, switching between those queueing backends without rewrite jobs become possible.&amp;lt;ref name= &amp;quot;Active-Job-Basics&amp;quot;&amp;gt;Rails Guides [http://guides.rubyonrails.org/active_job_basics.html “Active Job Basics” ]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
====Ruby On Rails versions support Active Job====&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;float:left;&amp;quot;&lt;br /&gt;
|+ Version history&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Date&lt;br /&gt;
|-&lt;br /&gt;
| 4.2 || 2014/12/19&lt;br /&gt;
|-&lt;br /&gt;
| 4.2.5 || 2015/11/13&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
====Active Job adapters&amp;lt;ref name=&amp;quot;Active-Job-Adapter&amp;quot;&amp;gt;Active Job Adapter[http://edgeapi.rubyonrails.org/classes/ActiveJob/QueueAdapters.html&amp;quot;Active Job Adapter&amp;quot; ]&amp;lt;/ref&amp;gt;====&lt;br /&gt;
List of queueing backends Active Job support:&lt;br /&gt;
*Backburner[https://github.com/nesquena/backburner]&lt;br /&gt;
*Delayed Job[https://github.com/collectiveidea/delayed_job]&lt;br /&gt;
*Qu[https://github.com/bkeepers/qu]&lt;br /&gt;
*Que[https://github.com/chanks/que]&lt;br /&gt;
*queue_classic[https://github.com/QueueClassic/queue_classic]&lt;br /&gt;
*Resque 1.x[https://github.com/resque/resque]&lt;br /&gt;
*Sidekiq[http://sidekiq.org/]&lt;br /&gt;
*Sneakers[https://github.com/jondot/sneakers]&lt;br /&gt;
*Sucker Punch[https://github.com/brandonhilkert/sucker_punch]&lt;br /&gt;
*Active Job Async Job&lt;br /&gt;
*Active Job Inline[http://edgeapi.rubyonrails.org/classes/ActiveJob/QueueAdapters/InlineAdapter.html]&lt;br /&gt;
&lt;br /&gt;
=='''How to use &amp;lt;ref&amp;gt;http://guides.rubyonrails.org/active_job_basics.html&amp;lt;/ref&amp;gt;'''==&lt;br /&gt;
This chapter is an introduction on how to create a job and and how to add the job into a queue. &amp;lt;ref name= &amp;quot;Active-Job-Basics&amp;quot;&amp;gt;Rails Guides [http://guides.rubyonrails.org/active_job_basics.html “Active Job Basics” 2014]&amp;lt;/ref&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
=== Download ===&lt;br /&gt;
With RubyGems[https://en.wikipedia.org/wiki/RubyGems] you can install Active Job:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install activejob&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://github.com/rails/rails/tree/master/activejob Souce code of Active Job] available on GitHub[https://en.wikipedia.org/wiki/GitHub], as part of Rails.&amp;lt;ref&amp;gt; GitHub [https://github.com/rails/rails/tree/master/activejob “Active Job -- Make work happen later” 2015] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create a Job ===&lt;br /&gt;
In Active Job, a process inserted in a queue and waiting to carry out is called “Job”. It’s possible to generate a Job using the Generator provided by Rails. You can create a Job in app/jobs. By doing the following, we created a Job called “update_wiki”.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bin/rails generate job update_wiki&lt;br /&gt;
  invoke  test_unit&lt;br /&gt;
  create  test/jobs/update_wiki_job_test.rb&lt;br /&gt;
  create  app/jobs/update_wiki_job.rb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Active Job provides the ability to run your Job on a specific queue by creating a job:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bin/rails generate job update_wiki --queue urgent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Files inside of app/jobs can be created manually, instead of using a generator. In Rails 4.2 an ActiveJob class inherits from ActiveJob::Base. In Rails 5.0, it has changed to now inherit from ApplicationJob. When upgrading from Rails 4.2 to Rails 5.0, an application_job.rb file is needed to be created in app/jobs/ and add the following content:&amp;lt;ref&amp;gt; Rails Guides [http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-4-1-to-rails-4-2 “A Guide for Upgrading Ruby on Rails” 2015] &amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class ApplicationJob &amp;lt; ActiveJob::Base&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In Rails 4.2 a Job class defined a perform method and set a “queue_as” value:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class UpdateWikiJob &amp;lt; ActiveJob::Base&lt;br /&gt;
  queue_as :default&lt;br /&gt;
 &lt;br /&gt;
  def perform(*wiki)&lt;br /&gt;
   # Do something later&lt;br /&gt;
  wiki.update_contents&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There is a perform method to be called when the Job was first enqueued. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adding a Job to the queue ===&lt;br /&gt;
Enqueue the Job so it can be processed as soon as the queuing system is free:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
UpdateWikiJob.perform_later wiki&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or add a Job be performed tomorrow at noon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
UpdateWikiJob.set(wait_until: Date.tomorrow.noon).perform_later(wiki)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Most of the queueing backends ( Sidekiq&lt;br /&gt;
, Delayed Job, etc. ) allow you to set a delay time.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
UpdateWikiJob.set(wait: 1.week).perform_later(wiki)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Execution of Job ===&lt;br /&gt;
Active Job provides adapters for multiple queueing backends ([https://github.com/mperham/sidekiq/wiki Sidekiq], [https://github.com/resque/resque Resque], [https://github.com/collectiveidea/delayed_job Delayed Job] and [http://edgeapi.rubyonrails.org/classes/ActiveJob/QueueAdapters.html others]).&amp;lt;ref name= &amp;quot;Active-Job-Basics&amp;quot;&amp;gt;Rails Guides [http://guides.rubyonrails.org/active_job_basics.html “Active Job Basics” 2014]&amp;lt;/ref&amp;gt; Without setting any adapter, the job would be performed immediately.&amp;lt;br&amp;gt;&lt;br /&gt;
Queueing backend can be set at: /config/application.rb, this example uses the Sidekiq.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module YourApp&lt;br /&gt;
  class Application &amp;lt; Rails::Application&lt;br /&gt;
    # Be sure to have the adapter's gem in your Gemfile and follow&lt;br /&gt;
    # the adapter's specific installation and deployment instructions.&lt;br /&gt;
    config.active_job.queue_adapter = :sidekiq&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Play with Queues ===&lt;br /&gt;
Active Job allows to schedule the job to be processed on a specific queue, this became helpful as common adapters support multiple queues.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class UpdateWikiJob &amp;lt; ActiveJob::Base&lt;br /&gt;
  queue_as :low_priority&lt;br /&gt;
  #....&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Queue name can be prefixed for all jobs using config.active_job.queue_name_prefixin application.rb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# config/application.rb&lt;br /&gt;
module YourApp&lt;br /&gt;
  class Application &amp;lt; Rails::Application&lt;br /&gt;
    config.active_job.queue_name_prefix = Rails.env&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
# app/jobs/update_wiki_job.rb&lt;br /&gt;
class UpdateWikiJob &amp;lt; ActiveJob::Base&lt;br /&gt;
  queue_as :low_priority&lt;br /&gt;
  #....&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
# Now your job will run on queue production_low_priority on your&lt;br /&gt;
# production environment and on staging_low_priority on your staging&lt;br /&gt;
# environment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Control a job to run on a queue by passing a :queue option to #set :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MyJob.set(queue: :another_queue).perform_later(record)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the code snippets are referred from the source&amp;lt;ref name= &amp;quot;Active-Job-Basics&amp;quot;&amp;gt;Rails Guides [http://guides.rubyonrails.org/active_job_basics.html “Active Job Basics” 2014]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
In this section, a example is provided to demonstrate how to use ActiveJob in practice.&lt;br /&gt;
=== Background Mail Sender ===&lt;br /&gt;
Send emails asynchronously with Action Mailer which Active Job is already integrated in.&amp;lt;ref name= &amp;quot;Action-Mailer-Basics&amp;quot;&amp;gt;Rails Guides [http://guides.rubyonrails.org/action_mailer_basics.html “Action Mailer Basics” 2014]&amp;lt;/ref&amp;gt; Here in this example, we try to use Active Job with Action Mailer.&amp;lt;br&amp;gt;&lt;br /&gt;
==== 1. Getting started with Rails&amp;lt;ref name= &amp;quot;Welcome_to_Rails&amp;quot;&amp;gt;GitHub [https://github.com/rails/rails “Welcome to Rails” 2015]&amp;lt;/ref&amp;gt; ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Install Rails if you haven’t done it yet:&lt;br /&gt;
$ gem install rails&lt;br /&gt;
&lt;br /&gt;
# Create a new Rails application, “myapp_activejob”&lt;br /&gt;
# is the name of the application:&lt;br /&gt;
$ rails new myapp_activejob&lt;br /&gt;
&lt;br /&gt;
# Change your directory to myapp_activejob&lt;br /&gt;
$ cd myapp_activejob&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Edit the Gemfile in the folder, add following into it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'responders'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Run “ $ bundle update “ and make sure “$ rails server” works.&lt;br /&gt;
&lt;br /&gt;
==== 2. Resque setup&amp;lt;ref name= &amp;quot;Download_Redis&amp;quot;&amp;gt;Redis [http://redis.io/download “Download Redis” 2016]&amp;lt;/ref&amp;gt;====&lt;br /&gt;
This example uses [https://github.com/resque/resque Resque] as the enqueuing backend. It'll need  [http://redis.io/ Redis] before running Resque. Redis can be installed using [http://brew.sh/ Homebrew]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ brew install redis&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or  download, extract and compile Redis using:&amp;lt;ref name= &amp;quot;Download_Redis&amp;quot;&amp;gt;Redis [http://redis.io/download “Download Redis” 2016]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wget http://download.redis.io/releases/redis-3.0.7.tar.gz&lt;br /&gt;
$ tar xzf redis-3.0.7.tar.gz&lt;br /&gt;
$ cd redis-3.0.7&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Redis does not officially support Microsoft [https://en.wikipedia.org/wiki/Microsoft_Windows Windows] platform, but it can be found  [https://github.com/MSOpenTech/redis Redis on Windows] by Microsoft Open Tech group.&amp;lt;br&amp;gt;&lt;br /&gt;
Next get Resque be installed. To use resque with Active Job, we also need resque-scheduler.&lt;br /&gt;
Add the following into Gemfile, and run “$ bundle install”.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'resque'&lt;br /&gt;
gem 'resque-scheduler'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After the installation, create a Resque configuration file resque.rb in config/initializers/&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#config/initializers/resque.rb&lt;br /&gt;
&lt;br /&gt;
Resque.redis = Redis.new(host: 'localhost', post: 6379)&lt;br /&gt;
Resque.after_fork = Proc.new { ActiveRecord::Base.establish_connection }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the Resque tasks and Resque Scheduler rake tasks are needed in this example, we need to create a resque.rake file in lib/tasks/:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#lib/tasks/resque.rake&lt;br /&gt;
&lt;br /&gt;
require 'resque/tasks'&lt;br /&gt;
require 'resque/scheduler/tasks'&lt;br /&gt;
&lt;br /&gt;
namespace :resque do&lt;br /&gt;
  task setup: :environment do&lt;br /&gt;
    ENV['TERM_CHILD'] ||= '1'&lt;br /&gt;
    ENV['QUEUE'] ||= '*'&lt;br /&gt;
    require 'resque'&lt;br /&gt;
    require 'resque-scheduler'&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 3. Creating a Mailer&amp;lt;ref name= &amp;quot;Action-Mailer-Basics&amp;quot;&amp;gt;Rails Guides [http://guides.rubyonrails.org/action_mailer_basics.html “Action Mailer Basics” 2014]&amp;lt;/ref&amp;gt; ====&lt;br /&gt;
By doing the things above, we already have our Rails project and the Resque for queuing get set. Next we will create a Mailer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bin/rails generate mailer user_mailer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a method and a view for sending the email.&amp;lt;br&amp;gt;&lt;br /&gt;
In app/mailer/user_mailer.rb:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#app/mailers/user_mailer.rb&lt;br /&gt;
&lt;br /&gt;
class UserMailer &amp;lt; ActionMailer::Base&lt;br /&gt;
  default from: 'from@example.com'&lt;br /&gt;
&lt;br /&gt;
  def test_email(email)&lt;br /&gt;
    mail(&lt;br /&gt;
      to: email,&lt;br /&gt;
      subject: 'We are testing Active Job!'&lt;br /&gt;
    )&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In app/views/user_mailer/test_email.text&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#app/views/user_mailer/test_email.text&lt;br /&gt;
&lt;br /&gt;
Hey, we are testing Active Job!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 4. Active Job&amp;lt;ref name= &amp;quot;Active-Job-Basics&amp;quot;&amp;gt;Rails Guides [http://guides.rubyonrails.org/active_job_basics.html “Active Job Basics” 2014]&amp;lt;/ref&amp;gt;====&lt;br /&gt;
Create a configuration file active_job.rb in config/initializers/ , to set Resque as queue_adapter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#config/initializers/active_job.rb&lt;br /&gt;
&lt;br /&gt;
ActiveJob::Base.queue_adapter = :resque&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a Job with generator.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bin/rails generate job test_email&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the generated file app/jobs/test_email_job.rb, define the perform method and set it’s queue_as.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#app/jobs/test_email_job.rb&lt;br /&gt;
&lt;br /&gt;
class TestEmailJob &amp;lt; ActiveJob::Base&lt;br /&gt;
  queue_as :email&lt;br /&gt;
&lt;br /&gt;
  def perform(email)&lt;br /&gt;
    UserMailer.test_email(email).deliver_now&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now a UserController is in place to put the job into the queue for later execution. Set the email to be sent one minute later for testing.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bin/rails generate job test_email&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#app/controllers/users_controller.rb&lt;br /&gt;
&lt;br /&gt;
class UsersController &amp;lt; ApplicationController&lt;br /&gt;
  def new&lt;br /&gt;
    @user = User.new&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def create&lt;br /&gt;
    @user = User.create(user_params)&lt;br /&gt;
    TestEmailJob.new(@user.email).deliver_later!(wait: 1.minute)&lt;br /&gt;
    # redirect somewhere&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Routes and views need to be set in order to make it work.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#config/routes.rb&lt;br /&gt;
&lt;br /&gt;
Rails.application.routes.draw do&lt;br /&gt;
  resources :users, only: [:new, :create]&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#app/views/users/new.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_for @user do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= f.email_field :email %&amp;gt;&lt;br /&gt;
  &amp;lt;%= f.submit %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 5. Try execution ====&lt;br /&gt;
Before trying the Mailer, MailCatcher[https://rubygems.org/gems/mailcatcher/versions/0.6.1] is needed for the test. Add following into Gemfile and “$ bundle install”&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'mailcatcher'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To set the environment, one need to add the following into config/environments/development.rb.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#config/environments/development.rb&lt;br /&gt;
&lt;br /&gt;
Rails.application.configure do&lt;br /&gt;
  ...&lt;br /&gt;
  config.action_mailer.delivery_method = :smtp&lt;br /&gt;
  config.action_mailer.smtp_settings = { address: &amp;quot;localhost&amp;quot;, port: 1025 }&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run it!&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start mailcatcher&lt;br /&gt;
$ mailcatcher&lt;br /&gt;
&lt;br /&gt;
# Start redis-server&lt;br /&gt;
$ redis-server&lt;br /&gt;
&lt;br /&gt;
# Start resque:work&lt;br /&gt;
$ bundle exec rake resque:work&lt;br /&gt;
&lt;br /&gt;
# Start resque:scheduler&lt;br /&gt;
$ rake environment resque:scheduler&lt;br /&gt;
&lt;br /&gt;
# Finally start rails server&lt;br /&gt;
$ rails server&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the browser and visit localhost:3000/users/new. Then sign up as a new user. One minute later Resque scheduler has following output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
resque-scheduler: [INFO] 2016-02-05T22:53:15+09:00: Processing Delayed Items&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And in MailCatcher:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
==&amp;gt; SMTP: Received message from '&amp;lt;from@example.com&amp;gt;' (315 bytes)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''External links'''==&lt;br /&gt;
&lt;br /&gt;
*[http://www.rubyonrails.org/ Ruby on Rails official website] – rubyonrails.org&lt;br /&gt;
*[http://railscasts.com/ Railscasts.com] – (defunct) Short Screencasts that focus on Ruby on Rails technique&lt;br /&gt;
*[http://rubycasts.io/ Rubycasts.io] – Weekly 15 minute screencasts on the whole Ruby/Rails development stack&lt;br /&gt;
*[http://www.railstutorial.org/ The Rails Tutorial] – The Ruby on Rails Tutorial book and screencast series teach you how to develop and deploy Ruby on Rails apps&lt;br /&gt;
*[https://github.com/rails/rails Rails source code]&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016&amp;diff=102477</id>
		<title>CSC/ECE 517 Fall 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016&amp;diff=102477"/>
		<updated>2016-09-08T19:29:27Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: Created page with &amp;quot;==Calibration Assignment Submissions== *Calibration Assignment Submission (Firebrick JS) *Calibration Assignment Submission (Active Job)&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (Firebrick JS)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Active Job)]]&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=MainPage&amp;diff=102476</id>
		<title>MainPage</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=MainPage&amp;diff=102476"/>
		<updated>2016-09-08T19:28:31Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Course-Specific Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Expertiza==&lt;br /&gt;
* [[Expertiza documentation]]&lt;br /&gt;
&lt;br /&gt;
==Course-Specific Topics==&lt;br /&gt;
&lt;br /&gt;
* [[CSC/ECE 517 Summer 2008]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2010]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2011]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2012]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2013]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2014]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2015]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2016]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2014]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2015]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2016]]&lt;br /&gt;
* [[CSC 456 Spring 2011|CSC 456 Spring 2012]]&lt;br /&gt;
* [[ECE 633]]&lt;br /&gt;
* [[KCU]]&lt;br /&gt;
* [[Progress reports]]&lt;br /&gt;
&lt;br /&gt;
==Application Behavior==&lt;br /&gt;
* [[Grading]]&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
* [[CSC/ECE_517_Spring_2013/ch1b_1k_hf|Lecture on Metaprogramming]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
''Expertiza now has a Java dependency, so the machine you are using to develop Expertiza on should have the JVM installed.''&lt;br /&gt;
&lt;br /&gt;
* [[Setting Up a Development Machine]]&lt;br /&gt;
* [[Creating a Linux Development Environment for Expertiza - Installation Guide]]&lt;br /&gt;
* [[Using git and github for projects]]&lt;br /&gt;
* [[Using heroku to deploy your projects]]&lt;br /&gt;
* [[How to Begin a Project from the Current Expertiza Repository]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[How to Change a User's Password on a Development Machine]]&lt;br /&gt;
* [[Debugging Rails]]&lt;br /&gt;
&lt;br /&gt;
==Production==&lt;br /&gt;
* [[Deploying to Production]]&lt;br /&gt;
* [[Downloading Production Data]]&lt;br /&gt;
* [[Accessing the Production Server]]&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
* [[Using Cucumber with Expertiza]]&lt;br /&gt;
* [[Rails Testing Overview]]&lt;br /&gt;
* [[Expertiza Continuous Integration]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
* [[Object-Oriented Design and Programming]]&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Patch_verb)&amp;diff=100628</id>
		<title>Calibration Assignment Submission (Patch verb)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(Patch_verb)&amp;diff=100628"/>
		<updated>2016-01-26T20:38:22Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: Created page with &amp;quot;The '''PATCH''' method is a request method supported by the [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] protocol for making partial changes to an existing re...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''PATCH''' method is a request method supported by the [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] protocol for making partial changes to an existing resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; The PATCH method provides an entity containing a list of changes to be applied to the resource requested using the [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI].&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; The list of changes are supplied in the form of a PATCH document.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; If the requested resource does not exist then the [https://en.wikipedia.org/wiki/Server_(computing) Server (computing)] may create the resource depending on the PATCH document media type and permissions.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; The changes described in the PATCH document must be semantically well defined but can have a different media type than the resource being patched.&amp;lt;ref&amp;gt;Don't Patch Like An Idiot http://williamdurand.fr/2014/02/14/please-do-not-patch-like-an-idiot/&amp;lt;/ref&amp;gt; Frameworks such as [https://en.wikipedia.org/wiki/XML XML], [https://en.wikipedia.org/wiki/JSON JSON] can be used in describing the changes in the PATCH document.&lt;br /&gt;
&lt;br /&gt;
==PUT vs PATCH vs POST==&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] is the foundation of data communication for the [https://en.wikipedia.org/wiki/World_Wide_Web World Wide Web]. [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] is a request-response protocol which helps users to communicate with the server to perform [https://en.wikipedia.org/wiki/Create,_read,_update_and_delete CRUD] operations. [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] supports a number of request methods such as PUT, [https://en.wikipedia.org/wiki/POST_(HTTP) POST] and PATCH to create or update resources.&amp;lt;ref name=RFC2616&amp;gt;Hypertext Transfer Protocol -- HTTP/1.1 https://www.ietf.org/rfc/rfc2616.txt&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The main difference between the PUT method and PATCH method is that the PUT method uses the request [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI] to supply a modified version of the requested resource which replaces the original version of the requested resource whereas the PATCH method supplies a set of instructions to modify the requested resource. If the PATCH document is larger than the size of the new version of the resource sent by the PUT method then the PUT method is preferred.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789|accessdate=2015-09-12}}&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method can be used for sending partial updates to a resource. The main difference between the [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method and the PATCH method is that the [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method can only be used when it is written to support the applications or the applications support its semantics whereas the PATCH method can be used in a generic way and does not require application support. If the outcome of using the PATCH method is not known then the [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method is preferred.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;Why PATCH is Good for Your HTTP API https://www.mnot.net/blog/2012/09/05/patch&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Patching resources==&lt;br /&gt;
&lt;br /&gt;
The PATCH method is [https://en.wikipedia.org/wiki/Atomicity_(database_systems) atomic].&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; Either all the changes specified by the PATCH method are applied or none of the changes are applied by the server.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; There are many ways of checking whether a patch was applied successfully. For example, the 'diff' utility can be applied to the older version and newer version of a file to find the differences between them.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A cached PATCH response is considered stale. It can only be used for the GET and HEAD requests that may follow the PATCH request.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The entity headers in the PATCH document are only applicable to the PATCH document and cannot be applied to the requested resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is no standard format for the PATCH document and it is different for different types of resources. The server has to check whether the PATCH document received is appropriate for the requested resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A '''JSON''' PATCH document would look like&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{ &amp;quot;op&amp;quot;: &amp;quot;add&amp;quot;, &amp;quot;variable&amp;quot;: &amp;quot;count&amp;quot;, &amp;quot;value&amp;quot;: 1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;op&amp;quot; represents the operation performed on the resource. &amp;quot;count&amp;quot; represents the resource being modified. &amp;quot;value&amp;quot; represents the amount being added to the existing resource. &amp;lt;ref name=RFCJSONPATCH&amp;gt;JSON Patch - draft-ietf-appsawg-json-patch-08 https://tools.ietf.org/html/draft-ietf-appsawg-json-patch-08&amp;lt;/ref&amp;gt; Before applying the changes in the PATCH document, the server has to check whether the PATCH document received is appropriate for the requested resource. If the PATCH request succeeds then it returns a '''200''' response.&lt;br /&gt;
&lt;br /&gt;
==Caution==&lt;br /&gt;
&lt;br /&gt;
The PATCH method is not safe. It may create new resources or change resources not mentioned in the [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI].&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The PATCH method is not idempotent. It can be made idempotent by using a conditional request.&amp;lt;ref name=RFC5789 /&amp;gt;When a client makes a conditional request to a resource, the request succeeds only if the resource has not been updated since the client last accessed that resource. This also helps in preventing corruption of the resource since some updates to a resource can only be performed starting from a certain base point.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Error handling==  &lt;br /&gt;
&lt;br /&gt;
A PATCH request can fail if any of the following errors occur: &lt;br /&gt;
===Malformed patch document===&lt;br /&gt;
The server returns a 400 (Bad request) response if the PATCH document is not formatted as required.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP|url=http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Unsupported patch document===&lt;br /&gt;
The server returns a 415 (Unsupported Media Type) response with an Accept-Patch response header containing supported media types when the client sends an unsupported patch document. This informs the client that the PATCH document sent by the client cannot be applied to the requested resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Unprocessable request===&lt;br /&gt;
The server returns a 422 (Unprocessable Entity) response when the server is able to understand the PATCH document but is unable to modify the requested resource either because it causes the resource to become invalid or it results in some other error state.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Resource not found===&lt;br /&gt;
The server returns a 404 (Not Found) response when the PATCH document cannot be applied to a non-existent resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Conflicting state===&lt;br /&gt;
The server returns a 409 (Conflict) response when the server cannot apply a patch for the current state of the resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Conflicting modification===&lt;br /&gt;
The server returns a 412 (Precondition Failed) response when the precondition supplied by the client using the If-Match or If-Unmodified-Since header fails. If no precondition is supplied and there is a conflicting modification then the server returns a 409 (Conflict) response.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Concurrent modification===&lt;br /&gt;
The server returns a 409 (Conflict) response if the PATCH requests to a certain resource need to be applied in a certain order and the server is not able to handle concurrent PATCH requests.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Trade-offs between PUT and PATCH==&lt;br /&gt;
&lt;br /&gt;
When only a few changes need to be applied to a resource, using the PUT method consumes more bandwidth as compared to the PATCH method which can be used for sending only the changes. But when the PATCH method is used, it usually involves fetching the resource from the server, comparing the original and new files, creating and sending a diff file. On the server side,the server has to read the diff file and make the modifications. This involves a lot of work overhead compared to PUT method.&amp;lt;ref name=51elliot&amp;gt;REST API Best Practices 3: Partial Updates - PATCH vs PUT http://51elliot.blogspot.com/2014/05/rest-api-best-practices-3-partial.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
On the other hand, the PUT method requires a GET to be performed before the PUT and it is difficult to ensure that the resource was not modified between the GET and PUT requests.&lt;br /&gt;
&lt;br /&gt;
==Security Considerations==&lt;br /&gt;
&lt;br /&gt;
The PATCH request needs to use mechanisms such as conditional requests using Etags and the If-Match request header to ensure that data is not corrupted while patching.&amp;lt;ref name=RFC5789 /&amp;gt; In case of a failure of a PATCH request or failure of the channel or a timeout, the client can use a GET request to check the state of the resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  The server has to ensure that malicious clients do not use the PATCH method for consuming excessive server resources.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(OmniAuth)&amp;diff=100627</id>
		<title>Calibration Assignment Submission (OmniAuth)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_(OmniAuth)&amp;diff=100627"/>
		<updated>2016-01-26T20:37:51Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: Created page with &amp;quot;OmniAuth is an authentication library written in [https://www.ruby-lang.org/en/ Ruby] under MIT License&amp;lt;ref name=&amp;quot;home&amp;quot;&amp;gt;Home Page https://opensource.org/licenses/MIT&amp;lt;/ref&amp;gt;. OmniA...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OmniAuth is an authentication library written in [https://www.ruby-lang.org/en/ Ruby] under MIT License&amp;lt;ref name=&amp;quot;home&amp;quot;&amp;gt;Home Page https://opensource.org/licenses/MIT&amp;lt;/ref&amp;gt;. OmniAuth is used to enable third party authentication in [https://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] applications. As of September 2015, OpenAuth supported authentication via 218 specific service providers&amp;lt;ref name=&amp;quot;los&amp;quot;&amp;gt;List of Strategies https://github.com/intridea/omniauth/wiki/List-of-Strategies&amp;lt;/ref&amp;gt;. In addition to the specific service providers, 13 generic authentication plugins are also provided.&amp;lt;ref name=&amp;quot;los&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
While working a Intridea, Micheal Bleigh started working on OmniAuth in 2008&amp;lt;ref name=&amp;quot;home&amp;quot;/&amp;gt;&amp;lt;ref&amp;gt;Micheal Bleigh http://www.intridea.com/about/team/michael-bleigh&amp;lt;/ref&amp;gt;. OmniAuth version 1.0 was released in November of 2011.&amp;lt;ref&amp;gt;Bleigh, Michael (2 November 2011) http://www.intridea.com/blog/2011/11/2/omniauth-1-0&amp;lt;/ref&amp;gt; The latest release of OmniAuth, version 1.2.2, was tagged on July 9, 2014&amp;lt;ref&amp;gt;omniauth Releases https://github.com/intridea/omniauth/releases&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Strategies==&lt;br /&gt;
OmniAuth referes to the plugins that provide authentication via authentication providers, ''strategies''. Strategies are further categorized into [[#Provider Strategies|provider strategies]] and [[#Developer Strategies|developer strategies]].&lt;br /&gt;
&lt;br /&gt;
===Provider Strategies ===&lt;br /&gt;
Provider strategies enable authentication to a specific authentication provider. Some example provider strategies are:&lt;br /&gt;
* Facebook&lt;br /&gt;
* GitHub&lt;br /&gt;
* Twitter&lt;br /&gt;
* Google&lt;br /&gt;
* Windows Live ID&lt;br /&gt;
&lt;br /&gt;
===Developer Strategies===&lt;br /&gt;
Developer strategies enable authentication to providers that conform to open or well known standards. Most of the specific provider strategies are customized versions of one of the developer strategies.&lt;br /&gt;
* CAS&lt;br /&gt;
* Http Basic&lt;br /&gt;
* Kerberos&lt;br /&gt;
* LDAP&lt;br /&gt;
* OAuth&lt;br /&gt;
* OAuth2&lt;br /&gt;
* OpenID&lt;br /&gt;
* OpenAM&lt;br /&gt;
* SAML&lt;br /&gt;
* Shibboleth&lt;br /&gt;
* WS-Federation&lt;br /&gt;
* XAuth&lt;br /&gt;
* ADFS&lt;br /&gt;
&lt;br /&gt;
==Ruby on Rails Integration==&lt;br /&gt;
Integrating OmniAuth into a Rails application that follows the standard authentication pattern for a Rails application is simply a matter of: (1) initialize an OmniAuth::Builder with your authentication provider details, (2) route login requests to &amp;lt;code&amp;gt;/auth/:provider&amp;lt;/code&amp;gt; instead of your own login page, and (3) route &amp;lt;code&amp;gt;/auth/:provider/callback&amp;lt;/code&amp;gt; to a controller action that initializes your user session (e.g. &amp;lt;code&amp;gt;sessions#create&amp;lt;/code&amp;gt;)&amp;lt;ref&amp;gt;OmniAuth Wiki https://github.com/intridea/omniauth/wiki&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OmniAuth README.md https://github.com/intridea/omniauth&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=100626</id>
		<title>CSC/ECE 517 Spring 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=100626"/>
		<updated>2016-01-26T20:37:29Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Calibration Assignment Submissions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (OmniAuth)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Patch_verb)]]&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=100625</id>
		<title>CSC/ECE 517 Spring 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=100625"/>
		<updated>2016-01-26T20:33:11Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission 1]]&lt;br /&gt;
*[[Calibration Assignment Submission 2]]&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=100624</id>
		<title>CSC/ECE 517 Spring 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=100624"/>
		<updated>2016-01-26T20:32:51Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (OmniAuth)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Patch_verb)]]&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_2&amp;diff=100623</id>
		<title>Calibration Assignment Submission 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_2&amp;diff=100623"/>
		<updated>2016-01-26T20:31:52Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Patching resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''PATCH''' method is a request method supported by the [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] protocol for making partial changes to an existing resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; The PATCH method provides an entity containing a list of changes to be applied to the resource requested using the [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI].&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; The list of changes are supplied in the form of a PATCH document.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; If the requested resource does not exist then the [https://en.wikipedia.org/wiki/Server_(computing) Server (computing)] may create the resource depending on the PATCH document media type and permissions.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; The changes described in the PATCH document must be semantically well defined but can have a different media type than the resource being patched.&amp;lt;ref&amp;gt;Don't Patch Like An Idiot http://williamdurand.fr/2014/02/14/please-do-not-patch-like-an-idiot/&amp;lt;/ref&amp;gt; Frameworks such as [https://en.wikipedia.org/wiki/XML XML], [https://en.wikipedia.org/wiki/JSON JSON] can be used in describing the changes in the PATCH document.&lt;br /&gt;
&lt;br /&gt;
==PUT vs PATCH vs POST==&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] is the foundation of data communication for the [https://en.wikipedia.org/wiki/World_Wide_Web World Wide Web]. [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] is a request-response protocol which helps users to communicate with the server to perform [https://en.wikipedia.org/wiki/Create,_read,_update_and_delete CRUD] operations. [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] supports a number of request methods such as PUT, [https://en.wikipedia.org/wiki/POST_(HTTP) POST] and PATCH to create or update resources.&amp;lt;ref name=RFC2616&amp;gt;Hypertext Transfer Protocol -- HTTP/1.1 https://www.ietf.org/rfc/rfc2616.txt&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The main difference between the PUT method and PATCH method is that the PUT method uses the request [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI] to supply a modified version of the requested resource which replaces the original version of the requested resource whereas the PATCH method supplies a set of instructions to modify the requested resource. If the PATCH document is larger than the size of the new version of the resource sent by the PUT method then the PUT method is preferred.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789|accessdate=2015-09-12}}&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method can be used for sending partial updates to a resource. The main difference between the [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method and the PATCH method is that the [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method can only be used when it is written to support the applications or the applications support its semantics whereas the PATCH method can be used in a generic way and does not require application support. If the outcome of using the PATCH method is not known then the [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method is preferred.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;Why PATCH is Good for Your HTTP API https://www.mnot.net/blog/2012/09/05/patch&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Patching resources==&lt;br /&gt;
&lt;br /&gt;
The PATCH method is [https://en.wikipedia.org/wiki/Atomicity_(database_systems) atomic].&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; Either all the changes specified by the PATCH method are applied or none of the changes are applied by the server.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; There are many ways of checking whether a patch was applied successfully. For example, the 'diff' utility can be applied to the older version and newer version of a file to find the differences between them.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A cached PATCH response is considered stale. It can only be used for the GET and HEAD requests that may follow the PATCH request.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The entity headers in the PATCH document are only applicable to the PATCH document and cannot be applied to the requested resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is no standard format for the PATCH document and it is different for different types of resources. The server has to check whether the PATCH document received is appropriate for the requested resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A '''JSON''' PATCH document would look like&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{ &amp;quot;op&amp;quot;: &amp;quot;add&amp;quot;, &amp;quot;variable&amp;quot;: &amp;quot;count&amp;quot;, &amp;quot;value&amp;quot;: 1 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;op&amp;quot; represents the operation performed on the resource. &amp;quot;count&amp;quot; represents the resource being modified. &amp;quot;value&amp;quot; represents the amount being added to the existing resource. &amp;lt;ref name=RFCJSONPATCH&amp;gt;JSON Patch - draft-ietf-appsawg-json-patch-08 https://tools.ietf.org/html/draft-ietf-appsawg-json-patch-08&amp;lt;/ref&amp;gt; Before applying the changes in the PATCH document, the server has to check whether the PATCH document received is appropriate for the requested resource. If the PATCH request succeeds then it returns a '''200''' response.&lt;br /&gt;
&lt;br /&gt;
==Caution==&lt;br /&gt;
&lt;br /&gt;
The PATCH method is not safe. It may create new resources or change resources not mentioned in the [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI].&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The PATCH method is not idempotent. It can be made idempotent by using a conditional request.&amp;lt;ref name=RFC5789 /&amp;gt;When a client makes a conditional request to a resource, the request succeeds only if the resource has not been updated since the client last accessed that resource. This also helps in preventing corruption of the resource since some updates to a resource can only be performed starting from a certain base point.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Error handling==  &lt;br /&gt;
&lt;br /&gt;
A PATCH request can fail if any of the following errors occur: &lt;br /&gt;
===Malformed patch document===&lt;br /&gt;
The server returns a 400 (Bad request) response if the PATCH document is not formatted as required.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP|url=http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Unsupported patch document===&lt;br /&gt;
The server returns a 415 (Unsupported Media Type) response with an Accept-Patch response header containing supported media types when the client sends an unsupported patch document. This informs the client that the PATCH document sent by the client cannot be applied to the requested resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Unprocessable request===&lt;br /&gt;
The server returns a 422 (Unprocessable Entity) response when the server is able to understand the PATCH document but is unable to modify the requested resource either because it causes the resource to become invalid or it results in some other error state.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Resource not found===&lt;br /&gt;
The server returns a 404 (Not Found) response when the PATCH document cannot be applied to a non-existent resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Conflicting state===&lt;br /&gt;
The server returns a 409 (Conflict) response when the server cannot apply a patch for the current state of the resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Conflicting modification===&lt;br /&gt;
The server returns a 412 (Precondition Failed) response when the precondition supplied by the client using the If-Match or If-Unmodified-Since header fails. If no precondition is supplied and there is a conflicting modification then the server returns a 409 (Conflict) response.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Concurrent modification===&lt;br /&gt;
The server returns a 409 (Conflict) response if the PATCH requests to a certain resource need to be applied in a certain order and the server is not able to handle concurrent PATCH requests.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Trade-offs between PUT and PATCH==&lt;br /&gt;
&lt;br /&gt;
When only a few changes need to be applied to a resource, using the PUT method consumes more bandwidth as compared to the PATCH method which can be used for sending only the changes. But when the PATCH method is used, it usually involves fetching the resource from the server, comparing the original and new files, creating and sending a diff file. On the server side,the server has to read the diff file and make the modifications. This involves a lot of work overhead compared to PUT method.&amp;lt;ref name=51elliot&amp;gt;REST API Best Practices 3: Partial Updates - PATCH vs PUT http://51elliot.blogspot.com/2014/05/rest-api-best-practices-3-partial.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
On the other hand, the PUT method requires a GET to be performed before the PUT and it is difficult to ensure that the resource was not modified between the GET and PUT requests.&lt;br /&gt;
&lt;br /&gt;
==Security Considerations==&lt;br /&gt;
&lt;br /&gt;
The PATCH request needs to use mechanisms such as conditional requests using Etags and the If-Match request header to ensure that data is not corrupted while patching.&amp;lt;ref name=RFC5789 /&amp;gt; In case of a failure of a PATCH request or failure of the channel or a timeout, the client can use a GET request to check the state of the resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  The server has to ensure that malicious clients do not use the PATCH method for consuming excessive server resources.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_2&amp;diff=100622</id>
		<title>Calibration Assignment Submission 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_2&amp;diff=100622"/>
		<updated>2016-01-26T20:28:31Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: Created page with &amp;quot;The '''PATCH''' method is a request method supported by the [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] protocol for making partial changes to an existing re...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''PATCH''' method is a request method supported by the [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] protocol for making partial changes to an existing resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; The PATCH method provides an entity containing a list of changes to be applied to the resource requested using the [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI].&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; The list of changes are supplied in the form of a PATCH document.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; If the requested resource does not exist then the [https://en.wikipedia.org/wiki/Server_(computing) Server (computing)] may create the resource depending on the PATCH document media type and permissions.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; The changes described in the PATCH document must be semantically well defined but can have a different media type than the resource being patched.&amp;lt;ref&amp;gt;Don't Patch Like An Idiot http://williamdurand.fr/2014/02/14/please-do-not-patch-like-an-idiot/&amp;lt;/ref&amp;gt; Frameworks such as [https://en.wikipedia.org/wiki/XML XML], [https://en.wikipedia.org/wiki/JSON JSON] can be used in describing the changes in the PATCH document.&lt;br /&gt;
&lt;br /&gt;
==PUT vs PATCH vs POST==&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] is the foundation of data communication for the [https://en.wikipedia.org/wiki/World_Wide_Web World Wide Web]. [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] is a request-response protocol which helps users to communicate with the server to perform [https://en.wikipedia.org/wiki/Create,_read,_update_and_delete CRUD] operations. [https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol HTTP] supports a number of request methods such as PUT, [https://en.wikipedia.org/wiki/POST_(HTTP) POST] and PATCH to create or update resources.&amp;lt;ref name=RFC2616&amp;gt;Hypertext Transfer Protocol -- HTTP/1.1 https://www.ietf.org/rfc/rfc2616.txt&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The main difference between the PUT method and PATCH method is that the PUT method uses the request [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI] to supply a modified version of the requested resource which replaces the original version of the requested resource whereas the PATCH method supplies a set of instructions to modify the requested resource. If the PATCH document is larger than the size of the new version of the resource sent by the PUT method then the PUT method is preferred.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789|accessdate=2015-09-12}}&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method can be used for sending partial updates to a resource. The main difference between the [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method and the PATCH method is that the [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method can only be used when it is written to support the applications or the applications support its semantics whereas the PATCH method can be used in a generic way and does not require application support. If the outcome of using the PATCH method is not known then the [https://en.wikipedia.org/wiki/POST_(HTTP) POST] method is preferred.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;Why PATCH is Good for Your HTTP API https://www.mnot.net/blog/2012/09/05/patch&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Patching resources==&lt;br /&gt;
&lt;br /&gt;
The PATCH method is [https://en.wikipedia.org/wiki/Atomicity_(database_systems) atomic].&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; Either all the changes specified by the PATCH method are applied or none of the changes are applied by the server.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; There are many ways of checking whether a patch was applied successfully. For example, the 'diff' utility can be applied to the older version and newer version of a file to find the differences between them.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A cached PATCH response is considered stale. It can only be used for the GET and HEAD requests that may follow the PATCH request.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The entity headers in the PATCH document are only applicable to the PATCH document and cannot be applied to the requested resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is no standard format for the PATCH document and it is different for different types of resources. The server has to check whether the PATCH document received is appropriate for the requested resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
A '''JSON''' PATCH document would look like &lt;br /&gt;
&amp;lt;source lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{ &amp;quot;op&amp;quot;: &amp;quot;add&amp;quot;, &amp;quot;variable&amp;quot;: &amp;quot;count&amp;quot;, &amp;quot;value&amp;quot;: 1 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;quot;op&amp;quot; represents the operation performed on the resource. &amp;quot;count&amp;quot; represents the resource being modified. &amp;quot;value&amp;quot; represents the amount being added to the existing resource. &amp;lt;ref name=RFCJSONPATCH&amp;gt;JSON Patch - draft-ietf-appsawg-json-patch-08 https://tools.ietf.org/html/draft-ietf-appsawg-json-patch-08&amp;lt;/ref&amp;gt; Before applying the changes in the PATCH document, the server has to check whether the PATCH document received is appropriate for the requested resource. If the PATCH request succeeds then it returns a '''200''' response.&lt;br /&gt;
&lt;br /&gt;
==Caution==&lt;br /&gt;
&lt;br /&gt;
The PATCH method is not safe. It may create new resources or change resources not mentioned in the [https://en.wikipedia.org/wiki/Uniform_Resource_Identifier URI].&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The PATCH method is not idempotent. It can be made idempotent by using a conditional request.&amp;lt;ref name=RFC5789 /&amp;gt;When a client makes a conditional request to a resource, the request succeeds only if the resource has not been updated since the client last accessed that resource. This also helps in preventing corruption of the resource since some updates to a resource can only be performed starting from a certain base point.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Error handling==  &lt;br /&gt;
&lt;br /&gt;
A PATCH request can fail if any of the following errors occur: &lt;br /&gt;
===Malformed patch document===&lt;br /&gt;
The server returns a 400 (Bad request) response if the PATCH document is not formatted as required.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP|url=http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Unsupported patch document===&lt;br /&gt;
The server returns a 415 (Unsupported Media Type) response with an Accept-Patch response header containing supported media types when the client sends an unsupported patch document. This informs the client that the PATCH document sent by the client cannot be applied to the requested resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Unprocessable request===&lt;br /&gt;
The server returns a 422 (Unprocessable Entity) response when the server is able to understand the PATCH document but is unable to modify the requested resource either because it causes the resource to become invalid or it results in some other error state.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Resource not found===&lt;br /&gt;
The server returns a 404 (Not Found) response when the PATCH document cannot be applied to a non-existent resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Conflicting state===&lt;br /&gt;
The server returns a 409 (Conflict) response when the server cannot apply a patch for the current state of the resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Conflicting modification===&lt;br /&gt;
The server returns a 412 (Precondition Failed) response when the precondition supplied by the client using the If-Match or If-Unmodified-Since header fails. If no precondition is supplied and there is a conflicting modification then the server returns a 409 (Conflict) response.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Concurrent modification===&lt;br /&gt;
The server returns a 409 (Conflict) response if the PATCH requests to a certain resource need to be applied in a certain order and the server is not able to handle concurrent PATCH requests.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Trade-offs between PUT and PATCH==&lt;br /&gt;
&lt;br /&gt;
When only a few changes need to be applied to a resource, using the PUT method consumes more bandwidth as compared to the PATCH method which can be used for sending only the changes. But when the PATCH method is used, it usually involves fetching the resource from the server, comparing the original and new files, creating and sending a diff file. On the server side,the server has to read the diff file and make the modifications. This involves a lot of work overhead compared to PUT method.&amp;lt;ref name=51elliot&amp;gt;REST API Best Practices 3: Partial Updates - PATCH vs PUT http://51elliot.blogspot.com/2014/05/rest-api-best-practices-3-partial.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
On the other hand, the PUT method requires a GET to be performed before the PUT and it is difficult to ensure that the resource was not modified between the GET and PUT requests.&lt;br /&gt;
&lt;br /&gt;
==Security Considerations==&lt;br /&gt;
&lt;br /&gt;
The PATCH request needs to use mechanisms such as conditional requests using Etags and the If-Match request header to ensure that data is not corrupted while patching.&amp;lt;ref name=RFC5789 /&amp;gt; In case of a failure of a PATCH request or failure of the channel or a timeout, the client can use a GET request to check the state of the resource.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt;  The server has to ensure that malicious clients do not use the PATCH method for consuming excessive server resources.&amp;lt;ref name=&amp;quot;RFC5789&amp;quot;&amp;gt;PATCH Method for HTTP http://tools.ietf.org/html/rfc5789&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_1&amp;diff=100621</id>
		<title>Calibration Assignment Submission 1</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Calibration_Assignment_Submission_1&amp;diff=100621"/>
		<updated>2016-01-26T20:06:21Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: Created page with &amp;quot;OmniAuth is an authentication library written in [https://www.ruby-lang.org/en/ Ruby] under MIT License&amp;lt;ref name=&amp;quot;home&amp;quot;&amp;gt;Home Page https://opensource.org/licenses/MIT&amp;lt;/ref&amp;gt;. OmniA...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OmniAuth is an authentication library written in [https://www.ruby-lang.org/en/ Ruby] under MIT License&amp;lt;ref name=&amp;quot;home&amp;quot;&amp;gt;Home Page https://opensource.org/licenses/MIT&amp;lt;/ref&amp;gt;. OmniAuth is used to enable third party authentication in [https://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] applications. As of September 2015, OpenAuth supported authentication via 218 specific service providers&amp;lt;ref name=&amp;quot;los&amp;quot;&amp;gt;List of Strategies https://github.com/intridea/omniauth/wiki/List-of-Strategies&amp;lt;/ref&amp;gt;. In addition to the specific service providers, 13 generic authentication plugins are also provided.&amp;lt;ref name=&amp;quot;los&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
While working a Intridea, Micheal Bleigh started working on OmniAuth in 2008&amp;lt;ref name=&amp;quot;home&amp;quot;/&amp;gt;&amp;lt;ref&amp;gt;Micheal Bleigh http://www.intridea.com/about/team/michael-bleigh&amp;lt;/ref&amp;gt;. OmniAuth version 1.0 was released in November of 2011.&amp;lt;ref&amp;gt;Bleigh, Michael (2 November 2011) http://www.intridea.com/blog/2011/11/2/omniauth-1-0&amp;lt;/ref&amp;gt; The latest release of OmniAuth, version 1.2.2, was tagged on July 9, 2014&amp;lt;ref&amp;gt;omniauth Releases https://github.com/intridea/omniauth/releases&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Strategies==&lt;br /&gt;
OmniAuth referes to the plugins that provide authentication via authentication providers, ''strategies''. Strategies are further categorized into [[#Provider Strategies|provider strategies]] and [[#Developer Strategies|developer strategies]].&lt;br /&gt;
&lt;br /&gt;
===Provider Strategies ===&lt;br /&gt;
Provider strategies enable authentication to a specific authentication provider. Some example provider strategies are:&lt;br /&gt;
* Facebook&lt;br /&gt;
* GitHub&lt;br /&gt;
* Twitter&lt;br /&gt;
* Google&lt;br /&gt;
* Windows Live ID&lt;br /&gt;
&lt;br /&gt;
===Developer Strategies===&lt;br /&gt;
Developer strategies enable authentication to providers that conform to open or well known standards. Most of the specific provider strategies are customized versions of one of the developer strategies.&lt;br /&gt;
* CAS&lt;br /&gt;
* Http Basic&lt;br /&gt;
* Kerberos&lt;br /&gt;
* LDAP&lt;br /&gt;
* OAuth&lt;br /&gt;
* OAuth2&lt;br /&gt;
* OpenID&lt;br /&gt;
* OpenAM&lt;br /&gt;
* SAML&lt;br /&gt;
* Shibboleth&lt;br /&gt;
* WS-Federation&lt;br /&gt;
* XAuth&lt;br /&gt;
* ADFS&lt;br /&gt;
&lt;br /&gt;
==Ruby on Rails Integration==&lt;br /&gt;
Integrating OmniAuth into a Rails application that follows the standard authentication pattern for a Rails application is simply a matter of: (1) initialize an OmniAuth::Builder with your authentication provider details, (2) route login requests to &amp;lt;code&amp;gt;/auth/:provider&amp;lt;/code&amp;gt; instead of your own login page, and (3) route &amp;lt;code&amp;gt;/auth/:provider/callback&amp;lt;/code&amp;gt; to a controller action that initializes your user session (e.g. &amp;lt;code&amp;gt;sessions#create&amp;lt;/code&amp;gt;)&amp;lt;ref&amp;gt;OmniAuth Wiki https://github.com/intridea/omniauth/wiki&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OmniAuth README.md https://github.com/intridea/omniauth&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=100620</id>
		<title>CSC/ECE 517 Spring 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2016&amp;diff=100620"/>
		<updated>2016-01-26T19:45:43Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: Created page with &amp;quot;==Calibration Assignment Submissions== *Calibration Assignment Submission 1 *Calibration Assignment Submission 2&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission 1]]&lt;br /&gt;
*[[Calibration Assignment Submission 2]]&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=MainPage&amp;diff=100619</id>
		<title>MainPage</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=MainPage&amp;diff=100619"/>
		<updated>2016-01-26T19:43:18Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Course-Specific Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Course-Specific Topics==&lt;br /&gt;
* [[CSC 216]] learning exercise&lt;br /&gt;
* [[CSC 379]]&lt;br /&gt;
* [[CSC/ECE 506 Fall 2007]]&lt;br /&gt;
* [[ECE506_Main_Page | CSC/ECE 506 Main Portal]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2007]]&lt;br /&gt;
* [[CSC/ECE 517 Summer 2008]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2010]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2011]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2012]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2013]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2014]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2015]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2014]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2015]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2016]]&lt;br /&gt;
* [[CSC 456 Spring 2011|CSC 456 Spring 2012]]&lt;br /&gt;
* [[ECE 633]]&lt;br /&gt;
* [[KCU]]&lt;br /&gt;
* [[Progress reports]]&lt;br /&gt;
&lt;br /&gt;
==Application Behavior==&lt;br /&gt;
* [[Grading]]&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
* [[CSC/ECE_517_Spring_2013/ch1b_1k_hf|Lecture on Metaprogramming]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
''Expertiza now has a Java dependency, so the machine you are using to develop Expertiza on should have the JVM installed.''&lt;br /&gt;
&lt;br /&gt;
* [[Setting Up a Development Machine]]&lt;br /&gt;
* [[Creating a Linux Development Environment for Expertiza - Installation Guide]]&lt;br /&gt;
* [[Using git and github for projects]]&lt;br /&gt;
* [[Using heroku to deploy your projects]]&lt;br /&gt;
* [[How to Begin a Project from the Current Expertiza Repository]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[How to Change a User's Password on a Development Machine]]&lt;br /&gt;
* [[Debugging Rails]]&lt;br /&gt;
&lt;br /&gt;
==Production==&lt;br /&gt;
* [[Deploying to Production]]&lt;br /&gt;
* [[Downloading Production Data]]&lt;br /&gt;
* [[Accessing the Production Server]]&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
* [[Using Cucumber with Expertiza]]&lt;br /&gt;
* [[Rails Testing Overview]]&lt;br /&gt;
* [[Expertiza Continuous Integration]]&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
* [[Object-Oriented Design and Programming]]&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=MainPage&amp;diff=97170</id>
		<title>MainPage</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=MainPage&amp;diff=97170"/>
		<updated>2015-10-26T18:53:05Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Course-Specific Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Course-Specific Topics==&lt;br /&gt;
* [[CSC 216]] learning exercise&lt;br /&gt;
* [[CSC 379]]&lt;br /&gt;
* [[CSC/ECE 506 Fall 2007]]&lt;br /&gt;
* [[ECE506_Main_Page | CSC/ECE 506 Main Portal]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2007]]&lt;br /&gt;
* [[CSC/ECE 517 Summer 2008]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2010]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2011]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2012]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2013]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2014]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2014]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2015]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2015]]&lt;br /&gt;
* [[CSC 456 Spring 2011|CSC 456 Spring 2012]]&lt;br /&gt;
* [[ECE 633]]&lt;br /&gt;
* [[KCU]]&lt;br /&gt;
* [[Progress reports]]&lt;br /&gt;
&lt;br /&gt;
==Application Behavior==&lt;br /&gt;
* [[Grading]]&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
* [[CSC/ECE_517_Spring_2013/ch1b_1k_hf|Lecture on Metaprogramming]]&lt;br /&gt;
&lt;br /&gt;
==Development==&lt;br /&gt;
&lt;br /&gt;
''Expertiza now has a Java dependency, so the machine you are using to develop Expertiza on should have the JVM installed.''&lt;br /&gt;
&lt;br /&gt;
* [[Setting Up a Development Machine]]&lt;br /&gt;
* [[Creating a Linux Development Environment for Expertiza - Installation Guide]]&lt;br /&gt;
* [[Using git and github for projects]]&lt;br /&gt;
* [[Using heroku to deploy your projects]]&lt;br /&gt;
* [[How to Begin a Project from the Current Expertiza Repository]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[How to Change a User's Password on a Development Machine]]&lt;br /&gt;
* [[Debugging Rails]]&lt;br /&gt;
&lt;br /&gt;
==Production==&lt;br /&gt;
* [[Deploying to Production]]&lt;br /&gt;
* [[Downloading Production Data]]&lt;br /&gt;
* [[Accessing the Production Server]]&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
* [[Using Cucumber with Expertiza]]&lt;br /&gt;
* [[Rails Testing Overview]]&lt;br /&gt;
* [[Expertiza Continuous Integration]]&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
* [[Object-Oriented Design and Programming]]&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96952</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96952"/>
		<updated>2015-04-25T19:36:45Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Set topics staggered deadline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Workflow'''==&lt;br /&gt;
&lt;br /&gt;
==='''Set topics staggered deadline'''===&lt;br /&gt;
At very beginning, we find that the type of &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; variable &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt;. However, we found that many attributes used not belonging to &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt; class. So we deceide to use has tables instead. In order to keep update the staggered deadline, we put this variable in session. We also comprehended the relationship of corresponding tables. The original due dates are stored in &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; table. And staggered-deadlines are stored in &amp;lt;code&amp;gt;TopicDeadline&amp;lt;/code&amp;gt; table. This table also stores different deadline types.&lt;br /&gt;
&lt;br /&gt;
Below is &amp;lt;code&amp;gt;save_topic_deadlines&amp;lt;/code&amp;gt; method after refactoring.&lt;br /&gt;
 def save_topic_deadlines&lt;br /&gt;
  #session[:duedates] stores all original duedates info&lt;br /&gt;
  #due_dates stores staggered duedates&lt;br /&gt;
  due_dates = params[:due_date]&lt;br /&gt;
  topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
  review_rounds = Assignment.find(params[:assignment_id]).get_review_rounds&lt;br /&gt;
  # j represents the review rounds&lt;br /&gt;
  j = 0&lt;br /&gt;
  topics.each { |topic|&lt;br /&gt;
    for i in 1..review_rounds&lt;br /&gt;
      topic_deadline_type_subm = DeadlineType.find_by_name('submission').id&lt;br /&gt;
      topic_deadline_subm = TopicDeadline.where(topic_id: session[:duedates][j]['id'].to_i, deadline_type_id: topic_deadline_type_subm, round: i).first&lt;br /&gt;
      topic_deadline_subm.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_submission_' + i.to_s + '_due_date']})&lt;br /&gt;
      flash[:error] = &amp;quot;Please enter a valid &amp;quot; + (i &amp;gt; 1 ? &amp;quot;Resubmission deadline &amp;quot; + (i-1).to_s : &amp;quot;Submission deadline&amp;quot;) if topic_deadline_subm.errors.length &amp;gt; 0&lt;br /&gt;
      topic_deadline_type_rev = DeadlineType.find_by_name('review').id&lt;br /&gt;
      topic_deadline_rev = TopicDeadline.where(topic_id: session[:duedates][j]['id'].to_i, deadline_type_id: topic_deadline_type_rev, round:i).first&lt;br /&gt;
      topic_deadline_rev.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_review_' + i.to_s + '_due_date']})&lt;br /&gt;
      flash[:error] = &amp;quot;Please enter a valid Review deadline &amp;quot; + (i &amp;gt; 1 ? (i-1).to_s : &amp;quot;&amp;quot;) if topic_deadline_rev.errors.length &amp;gt; 0&lt;br /&gt;
    end&lt;br /&gt;
    topic_deadline_subm = TopicDeadline.where(topic_id: session[:duedates][j]['id'], deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
    topic_deadline_subm.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_submission_' + (review_rounds+1).to_s + '_due_date']})&lt;br /&gt;
    flash[:error] = &amp;quot;Please enter a valid Meta review deadline&amp;quot; if topic_deadline_subm.errors.length &amp;gt; 0&lt;br /&gt;
    j = j + 1&lt;br /&gt;
  }&lt;br /&gt;
  redirect_to_assignment_edit(params[:assignment_id])&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==='''Save topics dependency and show dependency graph'''===&lt;br /&gt;
In edit signup sheet for assignment, we want to save topic dependency and show the depandency graph, as show below:&lt;br /&gt;
[[File:save_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
In order to show the dependency graph, we must first save topics dependency and save the topic dependency graph under &amp;lt;code&amp;gt; public/assets/staggered_deadline_assignment_graph &amp;lt;/code&amp;gt; path. We first add new method in 'due_date' model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.assign_start_due_date(assignment_id, set_of_topics)&lt;br /&gt;
&lt;br /&gt;
    #Remember, in create_common_start_time_topics function we reversed the graph so reverse it back&lt;br /&gt;
    set_of_topics = set_of_topics.reverse&lt;br /&gt;
&lt;br /&gt;
    set_of_topics_due_dates = Array.new&lt;br /&gt;
    i=0&lt;br /&gt;
    days_between_submissions = Assignment.find(assignment_id)['days_between_submissions'].to_i&lt;br /&gt;
    set_of_topics.each { |set_of_topic|&lt;br /&gt;
      set_of_due_dates = nil&lt;br /&gt;
      if i==0&lt;br /&gt;
        #take the first set from the table which user stores&lt;br /&gt;
        set_of_due_dates = DueDate.where(assignment_id)&lt;br /&gt;
        offset = 0&lt;br /&gt;
      else&lt;br /&gt;
        set_of_due_dates = TopicDeadline.where(set_of_topics[i-1][0])&lt;br /&gt;
        set_of_due_dates.sort_by { |a, b| a.due_at &amp;lt;=&amp;gt; b.due_at }&lt;br /&gt;
        offset = days_between_submissions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      set_of_topic.each { |topic_id|&lt;br /&gt;
        #if the due dates have already been created and the save dependency is being clicked,&lt;br /&gt;
        #then delete existing n create again&lt;br /&gt;
        prev_saved_due_dates = TopicDeadline.where(topic_id)&lt;br /&gt;
&lt;br /&gt;
        #Only if there is a dependency for the topic&lt;br /&gt;
        if !prev_saved_due_dates.nil?&lt;br /&gt;
          num_due_dates = prev_saved_due_dates.length&lt;br /&gt;
          #for each due date in the current topic he want to compare it to the previous due date&lt;br /&gt;
          for x in 0..num_due_dates - 1&lt;br /&gt;
            #we don't want the old date to move earlier in time so we save it as the new due date and destroy the old one  &lt;br /&gt;
            if DateTime.parse(set_of_due_dates[x].due_at.to_s) + offset.to_i &amp;lt; DateTime.parse(prev_saved_due_dates[x].due_at.to_s)&lt;br /&gt;
              set_of_due_dates[x] = prev_saved_due_dates[x]&lt;br /&gt;
              offset = 0&lt;br /&gt;
            end&lt;br /&gt;
            prev_saved_due_dates[x].destroy&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        set_of_due_dates.each { |due_date|&lt;br /&gt;
          create_topic_deadline(due_date, offset, topic_id)&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      i = i+1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change the &amp;lt;code&amp;gt;save_topic_dependencies&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt; sign_up_sheet_controller.rb &amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  - redirect_to_sign_up(params[:assignment_id])&lt;br /&gt;
  + redirect_to :action =&amp;gt; 'add_signup_topics_staggered', :id =&amp;gt; params[:assignment_id] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we use &amp;lt;code&amp;gt;RGL:Graph#write_to_graphic_file&amp;lt;/code&amp;gt; method to turn the dependency graph into &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file, we need to install graphviz in our gems. Otherwise, the RGL will uses &amp;lt;code&amp;gt;dot&amp;lt;/code&amp;gt; files as an intermediary format to produce image formats. If we download the &amp;lt;code&amp;gt;GraphViz&amp;lt;/code&amp;gt; packege, RGL will invoke it to produce a &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'graphviz' &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, after we click the &amp;lt;code&amp;gt;Save dependency&amp;lt;/code&amp;gt; button, and click &amp;lt;code&amp;gt;show dependency graph&amp;lt;/code&amp;gt; button, the dependency graph is shown below:&lt;br /&gt;
[[File:show_denpendency.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
==='''Test'''===&lt;br /&gt;
&lt;br /&gt;
==='''Deploy on VCL'''===&lt;br /&gt;
&lt;br /&gt;
* Visit http://vcl.ncsu.edu/ &amp;gt; Make a Reservation&lt;br /&gt;
* Select Ruby on Rails / Expertiza from the &amp;quot;Please select the environment ...&amp;quot; dropdown, select a duration, and then click Create Reservation&lt;br /&gt;
* Once the reservation is available, click Connect&lt;br /&gt;
* Follow the instructions on the connect screen (connect via SSH and then VNC). Connecting to SSH starts up VNC, the graphical environment to which you will connect.&lt;br /&gt;
* When connecting for the first time, it will prompt you for a password to access your (VNC) desktop. You can use any password, and it will be saved for later sessions.&lt;br /&gt;
* Follow the instructions given to connect to VNC. It is recommended to use [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0CB0QFjAA&amp;amp;url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fvnc%25C2%25AE-viewer-for-google-ch%2Fiabmpiboiopbgfabjmgeedhcmjenhbla&amp;amp;ei=LEY7Veq8C8GNNrvhgegI&amp;amp;usg=AFQjCNGxB1W4GwZrwQWHyBfik1cbjvXMkw VNC Viewer for Google Chrome].&lt;br /&gt;
* Once connected to VNC, you should see Rubymine running.&lt;br /&gt;
* Open a terminal (Applications &amp;gt; Accessories &amp;gt; Terminal), try hitting &amp;lt;ctrl&amp;gt;-C to kill pending task if your terminal does not work properly.&lt;br /&gt;
* Ensure you have at least 20M disk quota available: fs lq . You can allocate more space at https://sysnews.ncsu.edu/tools-bin/usmdb-quota&lt;br /&gt;
* Clone the git repository: git clone (expertiza repository URL)&lt;br /&gt;
* Change to the directory (cd expertiza). You may create a &amp;quot;database.yml&amp;quot; file based on &amp;quot;database.yml.example&amp;quot;.&lt;br /&gt;
* Use rvm use (ruby version) to switch to proper ruby version. Then run bundle install (you may need to downgrade the bundler to avoid bundle install failure) and rake db:migrate to set up development environment.&lt;br /&gt;
* Use &amp;quot;rails s -b 0.0.0.0&amp;quot; to start server which allows the access outside VCL by using url: VCL_ip:3000.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96951</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96951"/>
		<updated>2015-04-25T19:35:03Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Set topics staggered deadline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Workflow'''==&lt;br /&gt;
&lt;br /&gt;
==='''Set topics staggered deadline'''===&lt;br /&gt;
At very beginning, we find that the type of &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; variable &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt;. However, we found that many attributes used not belonging to &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt; class. So we deceide to use has tables instead. In order to keep update the staggered deadline, we put this variable in session. We also comprehended the relationship of corresponding tables. The original due dates are stored in &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; table. And staggered-deadlines are stored in &amp;lt;code&amp;gt;TopicDeadline&amp;lt;/code&amp;gt; table. This table also stores different deadline types.&lt;br /&gt;
&lt;br /&gt;
Below is &amp;lt;code&amp;gt;save_topic_deadlines&amp;lt;/code&amp;gt; method after refactoring.&lt;br /&gt;
  def save_topic_deadlines&lt;br /&gt;
          #session[:duedates] stores all original duedates info&lt;br /&gt;
          #due_dates stores staggered duedates&lt;br /&gt;
          due_dates = params[:due_date]&lt;br /&gt;
          topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
          review_rounds = Assignment.find(params[:assignment_id]).get_review_rounds&lt;br /&gt;
          # j represents the review rounds&lt;br /&gt;
          j = 0&lt;br /&gt;
          topics.each { |topic|&lt;br /&gt;
            for i in 1..review_rounds&lt;br /&gt;
              topic_deadline_type_subm = DeadlineType.find_by_name('submission').id&lt;br /&gt;
              topic_deadline_subm = TopicDeadline.where(topic_id: session[:duedates][j]['id'].to_i, deadline_type_id: topic_deadline_type_subm, round: i).first&lt;br /&gt;
              topic_deadline_subm.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_submission_' + i.to_s + '_due_date']})&lt;br /&gt;
              flash[:error] = &amp;quot;Please enter a valid &amp;quot; + (i &amp;gt; 1 ? &amp;quot;Resubmission deadline &amp;quot; + (i-1).to_s : &amp;quot;Submission deadline&amp;quot;) if topic_deadline_subm.errors.length &amp;gt; 0&lt;br /&gt;
              topic_deadline_type_rev = DeadlineType.find_by_name('review').id&lt;br /&gt;
              topic_deadline_rev = TopicDeadline.where(topic_id: session[:duedates][j]['id'].to_i, deadline_type_id: topic_deadline_type_rev, round:i).first&lt;br /&gt;
              topic_deadline_rev.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_review_' + i.to_s + '_due_date']})&lt;br /&gt;
              flash[:error] = &amp;quot;Please enter a valid Review deadline &amp;quot; + (i &amp;gt; 1 ? (i-1).to_s : &amp;quot;&amp;quot;) if topic_deadline_rev.errors.length &amp;gt; 0&lt;br /&gt;
            end&lt;br /&gt;
            topic_deadline_subm = TopicDeadline.where(topic_id: session[:duedates][j]['id'], deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
            topic_deadline_subm.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_submission_' + (review_rounds+1).to_s + '_due_date']})&lt;br /&gt;
            flash[:error] = &amp;quot;Please enter a valid Meta review deadline&amp;quot; if topic_deadline_subm.errors.length &amp;gt; 0&lt;br /&gt;
            j = j + 1&lt;br /&gt;
          }&lt;br /&gt;
    redirect_to_assignment_edit(params[:assignment_id])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
==='''Save topics dependency and show dependency graph'''===&lt;br /&gt;
In edit signup sheet for assignment, we want to save topic dependency and show the depandency graph, as show below:&lt;br /&gt;
[[File:save_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
In order to show the dependency graph, we must first save topics dependency and save the topic dependency graph under &amp;lt;code&amp;gt; public/assets/staggered_deadline_assignment_graph &amp;lt;/code&amp;gt; path. We first add new method in 'due_date' model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.assign_start_due_date(assignment_id, set_of_topics)&lt;br /&gt;
&lt;br /&gt;
    #Remember, in create_common_start_time_topics function we reversed the graph so reverse it back&lt;br /&gt;
    set_of_topics = set_of_topics.reverse&lt;br /&gt;
&lt;br /&gt;
    set_of_topics_due_dates = Array.new&lt;br /&gt;
    i=0&lt;br /&gt;
    days_between_submissions = Assignment.find(assignment_id)['days_between_submissions'].to_i&lt;br /&gt;
    set_of_topics.each { |set_of_topic|&lt;br /&gt;
      set_of_due_dates = nil&lt;br /&gt;
      if i==0&lt;br /&gt;
        #take the first set from the table which user stores&lt;br /&gt;
        set_of_due_dates = DueDate.where(assignment_id)&lt;br /&gt;
        offset = 0&lt;br /&gt;
      else&lt;br /&gt;
        set_of_due_dates = TopicDeadline.where(set_of_topics[i-1][0])&lt;br /&gt;
        set_of_due_dates.sort_by { |a, b| a.due_at &amp;lt;=&amp;gt; b.due_at }&lt;br /&gt;
        offset = days_between_submissions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      set_of_topic.each { |topic_id|&lt;br /&gt;
        #if the due dates have already been created and the save dependency is being clicked,&lt;br /&gt;
        #then delete existing n create again&lt;br /&gt;
        prev_saved_due_dates = TopicDeadline.where(topic_id)&lt;br /&gt;
&lt;br /&gt;
        #Only if there is a dependency for the topic&lt;br /&gt;
        if !prev_saved_due_dates.nil?&lt;br /&gt;
          num_due_dates = prev_saved_due_dates.length&lt;br /&gt;
          #for each due date in the current topic he want to compare it to the previous due date&lt;br /&gt;
          for x in 0..num_due_dates - 1&lt;br /&gt;
            #we don't want the old date to move earlier in time so we save it as the new due date and destroy the old one  &lt;br /&gt;
            if DateTime.parse(set_of_due_dates[x].due_at.to_s) + offset.to_i &amp;lt; DateTime.parse(prev_saved_due_dates[x].due_at.to_s)&lt;br /&gt;
              set_of_due_dates[x] = prev_saved_due_dates[x]&lt;br /&gt;
              offset = 0&lt;br /&gt;
            end&lt;br /&gt;
            prev_saved_due_dates[x].destroy&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        set_of_due_dates.each { |due_date|&lt;br /&gt;
          create_topic_deadline(due_date, offset, topic_id)&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      i = i+1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change the &amp;lt;code&amp;gt;save_topic_dependencies&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt; sign_up_sheet_controller.rb &amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  - redirect_to_sign_up(params[:assignment_id])&lt;br /&gt;
  + redirect_to :action =&amp;gt; 'add_signup_topics_staggered', :id =&amp;gt; params[:assignment_id] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we use &amp;lt;code&amp;gt;RGL:Graph#write_to_graphic_file&amp;lt;/code&amp;gt; method to turn the dependency graph into &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file, we need to install graphviz in our gems. Otherwise, the RGL will uses &amp;lt;code&amp;gt;dot&amp;lt;/code&amp;gt; files as an intermediary format to produce image formats. If we download the &amp;lt;code&amp;gt;GraphViz&amp;lt;/code&amp;gt; packege, RGL will invoke it to produce a &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'graphviz' &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, after we click the &amp;lt;code&amp;gt;Save dependency&amp;lt;/code&amp;gt; button, and click &amp;lt;code&amp;gt;show dependency graph&amp;lt;/code&amp;gt; button, the dependency graph is shown below:&lt;br /&gt;
[[File:show_denpendency.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
==='''Test'''===&lt;br /&gt;
&lt;br /&gt;
==='''Deploy on VCL'''===&lt;br /&gt;
&lt;br /&gt;
* Visit http://vcl.ncsu.edu/ &amp;gt; Make a Reservation&lt;br /&gt;
* Select Ruby on Rails / Expertiza from the &amp;quot;Please select the environment ...&amp;quot; dropdown, select a duration, and then click Create Reservation&lt;br /&gt;
* Once the reservation is available, click Connect&lt;br /&gt;
* Follow the instructions on the connect screen (connect via SSH and then VNC). Connecting to SSH starts up VNC, the graphical environment to which you will connect.&lt;br /&gt;
* When connecting for the first time, it will prompt you for a password to access your (VNC) desktop. You can use any password, and it will be saved for later sessions.&lt;br /&gt;
* Follow the instructions given to connect to VNC. It is recommended to use [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0CB0QFjAA&amp;amp;url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fvnc%25C2%25AE-viewer-for-google-ch%2Fiabmpiboiopbgfabjmgeedhcmjenhbla&amp;amp;ei=LEY7Veq8C8GNNrvhgegI&amp;amp;usg=AFQjCNGxB1W4GwZrwQWHyBfik1cbjvXMkw VNC Viewer for Google Chrome].&lt;br /&gt;
* Once connected to VNC, you should see Rubymine running.&lt;br /&gt;
* Open a terminal (Applications &amp;gt; Accessories &amp;gt; Terminal), try hitting &amp;lt;ctrl&amp;gt;-C to kill pending task if your terminal does not work properly.&lt;br /&gt;
* Ensure you have at least 20M disk quota available: fs lq . You can allocate more space at https://sysnews.ncsu.edu/tools-bin/usmdb-quota&lt;br /&gt;
* Clone the git repository: git clone (expertiza repository URL)&lt;br /&gt;
* Change to the directory (cd expertiza). You may create a &amp;quot;database.yml&amp;quot; file based on &amp;quot;database.yml.example&amp;quot;.&lt;br /&gt;
* Use rvm use (ruby version) to switch to proper ruby version. Then run bundle install (you may need to downgrade the bundler to avoid bundle install failure) and rake db:migrate to set up development environment.&lt;br /&gt;
* Use &amp;quot;rails s -b 0.0.0.0&amp;quot; to start server which allows the access outside VCL by using url: VCL_ip:3000.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96950</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96950"/>
		<updated>2015-04-25T19:34:32Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Save topics dependency and show dependency graph */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Workflow'''==&lt;br /&gt;
&lt;br /&gt;
==='''Set topics staggered deadline'''===&lt;br /&gt;
At very beginning, we find that the type of &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; variable &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt;. However, we found that many attributes used not belonging to &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt; class. So we deceide to use has tables instead. In order to keep update the staggered deadline, we put this variable in session. We also comprehended the relationship of corresponding tables. The original due dates are stored in &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; table. And staggered-deadlines are stored in &amp;lt;code&amp;gt;TopicDeadline&amp;lt;/code&amp;gt; table. This table also stores different deadline types.&lt;br /&gt;
&lt;br /&gt;
Below is &amp;lt;code&amp;gt;save_topic_deadlines&amp;lt;/code&amp;gt; method after refactoring.&lt;br /&gt;
  def save_topic_deadlines&lt;br /&gt;
          #session[:duedates] stores all original duedates info&lt;br /&gt;
          #due_dates stores staggered duedates&lt;br /&gt;
          due_dates = params[:due_date]&lt;br /&gt;
          topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
          review_rounds = Assignment.find(params[:assignment_id]).get_review_rounds&lt;br /&gt;
          # j represents the review rounds&lt;br /&gt;
          j = 0&lt;br /&gt;
          topics.each { |topic|&lt;br /&gt;
            for i in 1..review_rounds&lt;br /&gt;
              topic_deadline_type_subm = DeadlineType.find_by_name('submission').id&lt;br /&gt;
              topic_deadline_subm = TopicDeadline.where(topic_id: session[:duedates][j]['id'].to_i, deadline_type_id: topic_deadline_type_subm, round: i).first&lt;br /&gt;
              topic_deadline_subm.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_submission_' + i.to_s + '_due_date']})&lt;br /&gt;
              flash[:error] = &amp;quot;Please enter a valid &amp;quot; + (i &amp;gt; 1 ? &amp;quot;Resubmission deadline &amp;quot; + (i-1).to_s : &amp;quot;Submission deadline&amp;quot;) if topic_deadline_subm.errors.length &amp;gt; 0&lt;br /&gt;
              topic_deadline_type_rev = DeadlineType.find_by_name('review').id&lt;br /&gt;
              topic_deadline_rev = TopicDeadline.where(topic_id: session[:duedates][j]['id'].to_i, deadline_type_id: topic_deadline_type_rev, round:i).first&lt;br /&gt;
              topic_deadline_rev.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_review_' + i.to_s + '_due_date']})&lt;br /&gt;
              flash[:error] = &amp;quot;Please enter a valid Review deadline &amp;quot; + (i &amp;gt; 1 ? (i-1).to_s : &amp;quot;&amp;quot;) if topic_deadline_rev.errors.length &amp;gt; 0&lt;br /&gt;
            end&lt;br /&gt;
            topic_deadline_subm = TopicDeadline.where(topic_id: session[:duedates][j]['id'], deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
            topic_deadline_subm.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_submission_' + (review_rounds+1).to_s + '_due_date']})&lt;br /&gt;
            flash[:error] = &amp;quot;Please enter a valid Meta review deadline&amp;quot; if topic_deadline_subm.errors.length &amp;gt; 0&lt;br /&gt;
            j = j + 1&lt;br /&gt;
          }&lt;br /&gt;
          redirect_to_assignment_edit(params[:assignment_id])&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
==='''Save topics dependency and show dependency graph'''===&lt;br /&gt;
In edit signup sheet for assignment, we want to save topic dependency and show the depandency graph, as show below:&lt;br /&gt;
[[File:save_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
In order to show the dependency graph, we must first save topics dependency and save the topic dependency graph under &amp;lt;code&amp;gt; public/assets/staggered_deadline_assignment_graph &amp;lt;/code&amp;gt; path. We first add new method in 'due_date' model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.assign_start_due_date(assignment_id, set_of_topics)&lt;br /&gt;
&lt;br /&gt;
    #Remember, in create_common_start_time_topics function we reversed the graph so reverse it back&lt;br /&gt;
    set_of_topics = set_of_topics.reverse&lt;br /&gt;
&lt;br /&gt;
    set_of_topics_due_dates = Array.new&lt;br /&gt;
    i=0&lt;br /&gt;
    days_between_submissions = Assignment.find(assignment_id)['days_between_submissions'].to_i&lt;br /&gt;
    set_of_topics.each { |set_of_topic|&lt;br /&gt;
      set_of_due_dates = nil&lt;br /&gt;
      if i==0&lt;br /&gt;
        #take the first set from the table which user stores&lt;br /&gt;
        set_of_due_dates = DueDate.where(assignment_id)&lt;br /&gt;
        offset = 0&lt;br /&gt;
      else&lt;br /&gt;
        set_of_due_dates = TopicDeadline.where(set_of_topics[i-1][0])&lt;br /&gt;
        set_of_due_dates.sort_by { |a, b| a.due_at &amp;lt;=&amp;gt; b.due_at }&lt;br /&gt;
        offset = days_between_submissions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      set_of_topic.each { |topic_id|&lt;br /&gt;
        #if the due dates have already been created and the save dependency is being clicked,&lt;br /&gt;
        #then delete existing n create again&lt;br /&gt;
        prev_saved_due_dates = TopicDeadline.where(topic_id)&lt;br /&gt;
&lt;br /&gt;
        #Only if there is a dependency for the topic&lt;br /&gt;
        if !prev_saved_due_dates.nil?&lt;br /&gt;
          num_due_dates = prev_saved_due_dates.length&lt;br /&gt;
          #for each due date in the current topic he want to compare it to the previous due date&lt;br /&gt;
          for x in 0..num_due_dates - 1&lt;br /&gt;
            #we don't want the old date to move earlier in time so we save it as the new due date and destroy the old one  &lt;br /&gt;
            if DateTime.parse(set_of_due_dates[x].due_at.to_s) + offset.to_i &amp;lt; DateTime.parse(prev_saved_due_dates[x].due_at.to_s)&lt;br /&gt;
              set_of_due_dates[x] = prev_saved_due_dates[x]&lt;br /&gt;
              offset = 0&lt;br /&gt;
            end&lt;br /&gt;
            prev_saved_due_dates[x].destroy&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        set_of_due_dates.each { |due_date|&lt;br /&gt;
          create_topic_deadline(due_date, offset, topic_id)&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      i = i+1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change the &amp;lt;code&amp;gt;save_topic_dependencies&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt; sign_up_sheet_controller.rb &amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  - redirect_to_sign_up(params[:assignment_id])&lt;br /&gt;
  + redirect_to :action =&amp;gt; 'add_signup_topics_staggered', :id =&amp;gt; params[:assignment_id] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we use &amp;lt;code&amp;gt;RGL:Graph#write_to_graphic_file&amp;lt;/code&amp;gt; method to turn the dependency graph into &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file, we need to install graphviz in our gems. Otherwise, the RGL will uses &amp;lt;code&amp;gt;dot&amp;lt;/code&amp;gt; files as an intermediary format to produce image formats. If we download the &amp;lt;code&amp;gt;GraphViz&amp;lt;/code&amp;gt; packege, RGL will invoke it to produce a &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'graphviz' &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, after we click the &amp;lt;code&amp;gt;Save dependency&amp;lt;/code&amp;gt; button, and click &amp;lt;code&amp;gt;show dependency graph&amp;lt;/code&amp;gt; button, the dependency graph is shown below:&lt;br /&gt;
[[File:show_denpendency.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
==='''Test'''===&lt;br /&gt;
&lt;br /&gt;
==='''Deploy on VCL'''===&lt;br /&gt;
&lt;br /&gt;
* Visit http://vcl.ncsu.edu/ &amp;gt; Make a Reservation&lt;br /&gt;
* Select Ruby on Rails / Expertiza from the &amp;quot;Please select the environment ...&amp;quot; dropdown, select a duration, and then click Create Reservation&lt;br /&gt;
* Once the reservation is available, click Connect&lt;br /&gt;
* Follow the instructions on the connect screen (connect via SSH and then VNC). Connecting to SSH starts up VNC, the graphical environment to which you will connect.&lt;br /&gt;
* When connecting for the first time, it will prompt you for a password to access your (VNC) desktop. You can use any password, and it will be saved for later sessions.&lt;br /&gt;
* Follow the instructions given to connect to VNC. It is recommended to use [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0CB0QFjAA&amp;amp;url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fvnc%25C2%25AE-viewer-for-google-ch%2Fiabmpiboiopbgfabjmgeedhcmjenhbla&amp;amp;ei=LEY7Veq8C8GNNrvhgegI&amp;amp;usg=AFQjCNGxB1W4GwZrwQWHyBfik1cbjvXMkw VNC Viewer for Google Chrome].&lt;br /&gt;
* Once connected to VNC, you should see Rubymine running.&lt;br /&gt;
* Open a terminal (Applications &amp;gt; Accessories &amp;gt; Terminal), try hitting &amp;lt;ctrl&amp;gt;-C to kill pending task if your terminal does not work properly.&lt;br /&gt;
* Ensure you have at least 20M disk quota available: fs lq . You can allocate more space at https://sysnews.ncsu.edu/tools-bin/usmdb-quota&lt;br /&gt;
* Clone the git repository: git clone (expertiza repository URL)&lt;br /&gt;
* Change to the directory (cd expertiza). You may create a &amp;quot;database.yml&amp;quot; file based on &amp;quot;database.yml.example&amp;quot;.&lt;br /&gt;
* Use rvm use (ruby version) to switch to proper ruby version. Then run bundle install (you may need to downgrade the bundler to avoid bundle install failure) and rake db:migrate to set up development environment.&lt;br /&gt;
* Use &amp;quot;rails s -b 0.0.0.0&amp;quot; to start server which allows the access outside VCL by using url: VCL_ip:3000.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96949</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96949"/>
		<updated>2015-04-25T19:33:50Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Set topics staggered deadline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Workflow'''==&lt;br /&gt;
&lt;br /&gt;
==='''Set topics staggered deadline'''===&lt;br /&gt;
At very beginning, we find that the type of &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; variable &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt;. However, we found that many attributes used not belonging to &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt; class. So we deceide to use has tables instead. In order to keep update the staggered deadline, we put this variable in session. We also comprehended the relationship of corresponding tables. The original due dates are stored in &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; table. And staggered-deadlines are stored in &amp;lt;code&amp;gt;TopicDeadline&amp;lt;/code&amp;gt; table. This table also stores different deadline types.&lt;br /&gt;
&lt;br /&gt;
Below is &amp;lt;code&amp;gt;save_topic_deadlines&amp;lt;/code&amp;gt; method after refactoring.&lt;br /&gt;
  def save_topic_deadlines&lt;br /&gt;
          #session[:duedates] stores all original duedates info&lt;br /&gt;
          #due_dates stores staggered duedates&lt;br /&gt;
          due_dates = params[:due_date]&lt;br /&gt;
          topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
          review_rounds = Assignment.find(params[:assignment_id]).get_review_rounds&lt;br /&gt;
          # j represents the review rounds&lt;br /&gt;
          j = 0&lt;br /&gt;
          topics.each { |topic|&lt;br /&gt;
            for i in 1..review_rounds&lt;br /&gt;
              topic_deadline_type_subm = DeadlineType.find_by_name('submission').id&lt;br /&gt;
              topic_deadline_subm = TopicDeadline.where(topic_id: session[:duedates][j]['id'].to_i, deadline_type_id: topic_deadline_type_subm, round: i).first&lt;br /&gt;
              topic_deadline_subm.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_submission_' + i.to_s + '_due_date']})&lt;br /&gt;
              flash[:error] = &amp;quot;Please enter a valid &amp;quot; + (i &amp;gt; 1 ? &amp;quot;Resubmission deadline &amp;quot; + (i-1).to_s : &amp;quot;Submission deadline&amp;quot;) if topic_deadline_subm.errors.length &amp;gt; 0&lt;br /&gt;
              topic_deadline_type_rev = DeadlineType.find_by_name('review').id&lt;br /&gt;
              topic_deadline_rev = TopicDeadline.where(topic_id: session[:duedates][j]['id'].to_i, deadline_type_id: topic_deadline_type_rev, round:i).first&lt;br /&gt;
              topic_deadline_rev.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_review_' + i.to_s + '_due_date']})&lt;br /&gt;
              flash[:error] = &amp;quot;Please enter a valid Review deadline &amp;quot; + (i &amp;gt; 1 ? (i-1).to_s : &amp;quot;&amp;quot;) if topic_deadline_rev.errors.length &amp;gt; 0&lt;br /&gt;
            end&lt;br /&gt;
            topic_deadline_subm = TopicDeadline.where(topic_id: session[:duedates][j]['id'], deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
            topic_deadline_subm.update_attributes({'due_at' =&amp;gt; due_dates[session[:duedates][j]['id'].to_s + '_submission_' + (review_rounds+1).to_s + '_due_date']})&lt;br /&gt;
            flash[:error] = &amp;quot;Please enter a valid Meta review deadline&amp;quot; if topic_deadline_subm.errors.length &amp;gt; 0&lt;br /&gt;
            j = j + 1&lt;br /&gt;
          }&lt;br /&gt;
          redirect_to_assignment_edit(params[:assignment_id])&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
==='''Save topics dependency and show dependency graph'''===&lt;br /&gt;
In edit signup sheet for assignment, we want to save topic dependency and show the depandency graph, as show below:&lt;br /&gt;
[[File:save_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
In order to show the dependency graph, we must first save topics dependency and save the topic dependency graph under &amp;lt;code&amp;gt; public/assets/staggered_deadline_assignment_graph &amp;lt;/code&amp;gt; path. We first add new method in 'due_date' model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.assign_start_due_date(assignment_id, set_of_topics)&lt;br /&gt;
&lt;br /&gt;
    #Remember, in create_common_start_time_topics function we reversed the graph so reverse it back&lt;br /&gt;
    set_of_topics = set_of_topics.reverse&lt;br /&gt;
&lt;br /&gt;
    set_of_topics_due_dates = Array.new&lt;br /&gt;
    i=0&lt;br /&gt;
    days_between_submissions = Assignment.find(assignment_id)['days_between_submissions'].to_i&lt;br /&gt;
    set_of_topics.each { |set_of_topic|&lt;br /&gt;
      set_of_due_dates = nil&lt;br /&gt;
      if i==0&lt;br /&gt;
        #take the first set from the table which user stores&lt;br /&gt;
        set_of_due_dates = DueDate.where(assignment_id)&lt;br /&gt;
        offset = 0&lt;br /&gt;
      else&lt;br /&gt;
        set_of_due_dates = TopicDeadline.where(set_of_topics[i-1][0])&lt;br /&gt;
        set_of_due_dates.sort_by { |a, b| a.due_at &amp;lt;=&amp;gt; b.due_at }&lt;br /&gt;
        offset = days_between_submissions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      set_of_topic.each { |topic_id|&lt;br /&gt;
        #if the due dates have already been created and the save dependency is being clicked,&lt;br /&gt;
        #then delete existing n create again&lt;br /&gt;
        prev_saved_due_dates = TopicDeadline.where(topic_id)&lt;br /&gt;
&lt;br /&gt;
        #Only if there is a dependency for the topic&lt;br /&gt;
        if !prev_saved_due_dates.nil?&lt;br /&gt;
          num_due_dates = prev_saved_due_dates.length&lt;br /&gt;
          #for each due date in the current topic he want to compare it to the previous due date&lt;br /&gt;
          for x in 0..num_due_dates - 1&lt;br /&gt;
            #we don't want the old date to move earlier in time so we save it as the new due date and destroy the old one  &lt;br /&gt;
            if DateTime.parse(set_of_due_dates[x].due_at.to_s) + offset.to_i &amp;lt; DateTime.parse(prev_saved_due_dates[x].due_at.to_s)&lt;br /&gt;
              set_of_due_dates[x] = prev_saved_due_dates[x]&lt;br /&gt;
              offset = 0&lt;br /&gt;
            end&lt;br /&gt;
            prev_saved_due_dates[x].destroy&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        set_of_due_dates.each { |due_date|&lt;br /&gt;
          create_topic_deadline(due_date, offset, topic_id)&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      i = i+1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change the &amp;lt;code&amp;gt;save_topic_dependencies&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt; sign_up_sheet_controller.rb &amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
492 - redirect_to_sign_up(params[:assignment_id])&lt;br /&gt;
493 + redirect_to :action =&amp;gt; 'add_signup_topics_staggered', :id =&amp;gt; params[:assignment_id] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we use &amp;lt;code&amp;gt;RGL:Graph#write_to_graphic_file&amp;lt;/code&amp;gt; method to turn the dependency graph into &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file, we need to install graphviz in our gems. Otherwise, the RGL will uses &amp;lt;code&amp;gt;dot&amp;lt;/code&amp;gt; files as an intermediary format to produce image formats. If we download the &amp;lt;code&amp;gt;GraphViz&amp;lt;/code&amp;gt; packege, RGL will invoke it to produce a &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'graphviz' &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, after we click the &amp;lt;code&amp;gt;Save dependency&amp;lt;/code&amp;gt; button, and click &amp;lt;code&amp;gt;show dependency graph&amp;lt;/code&amp;gt; button, the dependency graph is shown below:&lt;br /&gt;
[[File:show_denpendency.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
==='''Test'''===&lt;br /&gt;
&lt;br /&gt;
==='''Deploy on VCL'''===&lt;br /&gt;
&lt;br /&gt;
* Visit http://vcl.ncsu.edu/ &amp;gt; Make a Reservation&lt;br /&gt;
* Select Ruby on Rails / Expertiza from the &amp;quot;Please select the environment ...&amp;quot; dropdown, select a duration, and then click Create Reservation&lt;br /&gt;
* Once the reservation is available, click Connect&lt;br /&gt;
* Follow the instructions on the connect screen (connect via SSH and then VNC). Connecting to SSH starts up VNC, the graphical environment to which you will connect.&lt;br /&gt;
* When connecting for the first time, it will prompt you for a password to access your (VNC) desktop. You can use any password, and it will be saved for later sessions.&lt;br /&gt;
* Follow the instructions given to connect to VNC. It is recommended to use [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0CB0QFjAA&amp;amp;url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fvnc%25C2%25AE-viewer-for-google-ch%2Fiabmpiboiopbgfabjmgeedhcmjenhbla&amp;amp;ei=LEY7Veq8C8GNNrvhgegI&amp;amp;usg=AFQjCNGxB1W4GwZrwQWHyBfik1cbjvXMkw VNC Viewer for Google Chrome].&lt;br /&gt;
* Once connected to VNC, you should see Rubymine running.&lt;br /&gt;
* Open a terminal (Applications &amp;gt; Accessories &amp;gt; Terminal), try hitting &amp;lt;ctrl&amp;gt;-C to kill pending task if your terminal does not work properly.&lt;br /&gt;
* Ensure you have at least 20M disk quota available: fs lq . You can allocate more space at https://sysnews.ncsu.edu/tools-bin/usmdb-quota&lt;br /&gt;
* Clone the git repository: git clone (expertiza repository URL)&lt;br /&gt;
* Change to the directory (cd expertiza). You may create a &amp;quot;database.yml&amp;quot; file based on &amp;quot;database.yml.example&amp;quot;.&lt;br /&gt;
* Use rvm use (ruby version) to switch to proper ruby version. Then run bundle install (you may need to downgrade the bundler to avoid bundle install failure) and rake db:migrate to set up development environment.&lt;br /&gt;
* Use &amp;quot;rails s -b 0.0.0.0&amp;quot; to start server which allows the access outside VCL by using url: VCL_ip:3000.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96948</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96948"/>
		<updated>2015-04-25T19:32:50Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Save topics dependency and show dependency graph */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Workflow'''==&lt;br /&gt;
&lt;br /&gt;
==='''Set topics staggered deadline'''===&lt;br /&gt;
At very beginning, we find that the type of &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; variable &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt;. However, we found that many attributes used not belonging to &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt; class. So we deceide to use has tables instead. In order to keep update the staggered deadline, we put this variable in session. We also comprehended the relationship of corresponding tables. The original due dates are stored in &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; table. And staggered-deadlines are stored in &amp;lt;code&amp;gt;TopicDeadline&amp;lt;/code&amp;gt; table. This table also stores different deadline types.&lt;br /&gt;
&lt;br /&gt;
Below is &amp;lt;code&amp;gt;save_topic_deadlines&amp;lt;/code&amp;gt; method after refactoring.&lt;br /&gt;
&lt;br /&gt;
==='''Save topics dependency and show dependency graph'''===&lt;br /&gt;
In edit signup sheet for assignment, we want to save topic dependency and show the depandency graph, as show below:&lt;br /&gt;
[[File:save_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
In order to show the dependency graph, we must first save topics dependency and save the topic dependency graph under &amp;lt;code&amp;gt; public/assets/staggered_deadline_assignment_graph &amp;lt;/code&amp;gt; path. We first add new method in 'due_date' model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.assign_start_due_date(assignment_id, set_of_topics)&lt;br /&gt;
&lt;br /&gt;
    #Remember, in create_common_start_time_topics function we reversed the graph so reverse it back&lt;br /&gt;
    set_of_topics = set_of_topics.reverse&lt;br /&gt;
&lt;br /&gt;
    set_of_topics_due_dates = Array.new&lt;br /&gt;
    i=0&lt;br /&gt;
    days_between_submissions = Assignment.find(assignment_id)['days_between_submissions'].to_i&lt;br /&gt;
    set_of_topics.each { |set_of_topic|&lt;br /&gt;
      set_of_due_dates = nil&lt;br /&gt;
      if i==0&lt;br /&gt;
        #take the first set from the table which user stores&lt;br /&gt;
        set_of_due_dates = DueDate.where(assignment_id)&lt;br /&gt;
        offset = 0&lt;br /&gt;
      else&lt;br /&gt;
        set_of_due_dates = TopicDeadline.where(set_of_topics[i-1][0])&lt;br /&gt;
        set_of_due_dates.sort_by { |a, b| a.due_at &amp;lt;=&amp;gt; b.due_at }&lt;br /&gt;
        offset = days_between_submissions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      set_of_topic.each { |topic_id|&lt;br /&gt;
        #if the due dates have already been created and the save dependency is being clicked,&lt;br /&gt;
        #then delete existing n create again&lt;br /&gt;
        prev_saved_due_dates = TopicDeadline.where(topic_id)&lt;br /&gt;
&lt;br /&gt;
        #Only if there is a dependency for the topic&lt;br /&gt;
        if !prev_saved_due_dates.nil?&lt;br /&gt;
          num_due_dates = prev_saved_due_dates.length&lt;br /&gt;
          #for each due date in the current topic he want to compare it to the previous due date&lt;br /&gt;
          for x in 0..num_due_dates - 1&lt;br /&gt;
            #we don't want the old date to move earlier in time so we save it as the new due date and destroy the old one  &lt;br /&gt;
            if DateTime.parse(set_of_due_dates[x].due_at.to_s) + offset.to_i &amp;lt; DateTime.parse(prev_saved_due_dates[x].due_at.to_s)&lt;br /&gt;
              set_of_due_dates[x] = prev_saved_due_dates[x]&lt;br /&gt;
              offset = 0&lt;br /&gt;
            end&lt;br /&gt;
            prev_saved_due_dates[x].destroy&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        set_of_due_dates.each { |due_date|&lt;br /&gt;
          create_topic_deadline(due_date, offset, topic_id)&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      i = i+1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change the &amp;lt;code&amp;gt;save_topic_dependencies&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt; sign_up_sheet_controller.rb &amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
492 - redirect_to_sign_up(params[:assignment_id])&lt;br /&gt;
493 + redirect_to :action =&amp;gt; 'add_signup_topics_staggered', :id =&amp;gt; params[:assignment_id] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we use &amp;lt;code&amp;gt;RGL:Graph#write_to_graphic_file&amp;lt;/code&amp;gt; method to turn the dependency graph into &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file, we need to install graphviz in our gems. Otherwise, the RGL will uses &amp;lt;code&amp;gt;dot&amp;lt;/code&amp;gt; files as an intermediary format to produce image formats. If we download the &amp;lt;code&amp;gt;GraphViz&amp;lt;/code&amp;gt; packege, RGL will invoke it to produce a &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'graphviz' &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, after we click the &amp;lt;code&amp;gt;Save dependency&amp;lt;/code&amp;gt; button, and click &amp;lt;code&amp;gt;show dependency graph&amp;lt;/code&amp;gt; button, the dependency graph is shown below:&lt;br /&gt;
[[File:show_denpendency.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
==='''Test'''===&lt;br /&gt;
&lt;br /&gt;
==='''Deploy on VCL'''===&lt;br /&gt;
&lt;br /&gt;
* Visit http://vcl.ncsu.edu/ &amp;gt; Make a Reservation&lt;br /&gt;
* Select Ruby on Rails / Expertiza from the &amp;quot;Please select the environment ...&amp;quot; dropdown, select a duration, and then click Create Reservation&lt;br /&gt;
* Once the reservation is available, click Connect&lt;br /&gt;
* Follow the instructions on the connect screen (connect via SSH and then VNC). Connecting to SSH starts up VNC, the graphical environment to which you will connect.&lt;br /&gt;
* When connecting for the first time, it will prompt you for a password to access your (VNC) desktop. You can use any password, and it will be saved for later sessions.&lt;br /&gt;
* Follow the instructions given to connect to VNC. It is recommended to use [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0CB0QFjAA&amp;amp;url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fvnc%25C2%25AE-viewer-for-google-ch%2Fiabmpiboiopbgfabjmgeedhcmjenhbla&amp;amp;ei=LEY7Veq8C8GNNrvhgegI&amp;amp;usg=AFQjCNGxB1W4GwZrwQWHyBfik1cbjvXMkw VNC Viewer for Google Chrome].&lt;br /&gt;
* Once connected to VNC, you should see Rubymine running.&lt;br /&gt;
* Open a terminal (Applications &amp;gt; Accessories &amp;gt; Terminal), try hitting &amp;lt;ctrl&amp;gt;-C to kill pending task if your terminal does not work properly.&lt;br /&gt;
* Ensure you have at least 20M disk quota available: fs lq . You can allocate more space at https://sysnews.ncsu.edu/tools-bin/usmdb-quota&lt;br /&gt;
* Clone the git repository: git clone (expertiza repository URL)&lt;br /&gt;
* Change to the directory (cd expertiza). You may create a &amp;quot;database.yml&amp;quot; file based on &amp;quot;database.yml.example&amp;quot;.&lt;br /&gt;
* Use rvm use (ruby version) to switch to proper ruby version. Then run bundle install (you may need to downgrade the bundler to avoid bundle install failure) and rake db:migrate to set up development environment.&lt;br /&gt;
* Use &amp;quot;rails s -b 0.0.0.0&amp;quot; to start server which allows the access outside VCL by using url: VCL_ip:3000.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96947</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96947"/>
		<updated>2015-04-25T19:32:28Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Set topics staggered deadline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Workflow'''==&lt;br /&gt;
&lt;br /&gt;
==='''Set topics staggered deadline'''===&lt;br /&gt;
At very beginning, we find that the type of &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; variable &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt;. However, we found that many attributes used not belonging to &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt; class. So we deceide to use has tables instead. In order to keep update the staggered deadline, we put this variable in session. We also comprehended the relationship of corresponding tables. The original due dates are stored in &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; table. And staggered-deadlines are stored in &amp;lt;code&amp;gt;TopicDeadline&amp;lt;/code&amp;gt; table. This table also stores different deadline types.&lt;br /&gt;
&lt;br /&gt;
Below is &amp;lt;code&amp;gt;save_topic_deadlines&amp;lt;/code&amp;gt; method after refactoring.&lt;br /&gt;
&lt;br /&gt;
==='''Save topics dependency and show dependency graph'''===&lt;br /&gt;
In edit signup sheet for assignment, we want to save topic dependency and show the depandency graph, as show below:&lt;br /&gt;
[[File:save_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
In order to show the dependency graph, we must first save topics dependency and save the topic dependency graph under &amp;lt;code&amp;gt; public/assets/staggered_deadline_assignment_graph &amp;lt;/code&amp;gt; path. We first add new method in 'due_date' model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.assign_start_due_date(assignment_id, set_of_topics)&lt;br /&gt;
&lt;br /&gt;
    #Remember, in create_common_start_time_topics function we reversed the graph so reverse it back&lt;br /&gt;
    set_of_topics = set_of_topics.reverse&lt;br /&gt;
&lt;br /&gt;
    set_of_topics_due_dates = Array.new&lt;br /&gt;
    i=0&lt;br /&gt;
    days_between_submissions = Assignment.find(assignment_id)['days_between_submissions'].to_i&lt;br /&gt;
    set_of_topics.each { |set_of_topic|&lt;br /&gt;
      set_of_due_dates = nil&lt;br /&gt;
      if i==0&lt;br /&gt;
        #take the first set from the table which user stores&lt;br /&gt;
        set_of_due_dates = DueDate.where(assignment_id)&lt;br /&gt;
        offset = 0&lt;br /&gt;
      else&lt;br /&gt;
        set_of_due_dates = TopicDeadline.where(set_of_topics[i-1][0])&lt;br /&gt;
        set_of_due_dates.sort_by { |a, b| a.due_at &amp;lt;=&amp;gt; b.due_at }&lt;br /&gt;
        offset = days_between_submissions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      set_of_topic.each { |topic_id|&lt;br /&gt;
        #if the due dates have already been created and the save dependency is being clicked,&lt;br /&gt;
        #then delete existing n create again&lt;br /&gt;
        prev_saved_due_dates = TopicDeadline.where(topic_id)&lt;br /&gt;
&lt;br /&gt;
        #Only if there is a dependency for the topic&lt;br /&gt;
        if !prev_saved_due_dates.nil?&lt;br /&gt;
          num_due_dates = prev_saved_due_dates.length&lt;br /&gt;
          #for each due date in the current topic he want to compare it to the previous due date&lt;br /&gt;
          for x in 0..num_due_dates - 1&lt;br /&gt;
            #we don't want the old date to move earlier in time so we save it as the new due date and destroy the old one  &lt;br /&gt;
            if DateTime.parse(set_of_due_dates[x].due_at.to_s) + offset.to_i &amp;lt; DateTime.parse(prev_saved_due_dates[x].due_at.to_s)&lt;br /&gt;
              set_of_due_dates[x] = prev_saved_due_dates[x]&lt;br /&gt;
              offset = 0&lt;br /&gt;
            end&lt;br /&gt;
            prev_saved_due_dates[x].destroy&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        set_of_due_dates.each { |due_date|&lt;br /&gt;
          create_topic_deadline(due_date, offset, topic_id)&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      i = i+1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change the &amp;lt;code&amp;gt;save_topic_dependencies&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt; sign_up_sheet_controller.rb &amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
492 - redirect_to_sign_up(params[:assignment_id])&lt;br /&gt;
493 + redirect_to :action =&amp;gt; 'add_signup_topics_staggered', :id =&amp;gt; params[:assignment_id] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we use &amp;lt;code&amp;gt;RGL:Graph#write_to_graphic_file&amp;lt;/code&amp;gt; method to turn the dependency graph into &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file, we need to install graphviz in our gems. Otherwise, the RGL will uses &amp;lt;code&amp;gt;dot&amp;lt;/code&amp;gt; files as an intermediary format to produce image formats. If we download the &amp;lt;code&amp;gt;GraphViz&amp;lt;/code&amp;gt; packege, RGL will invoke it to produce a &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'graphviz' &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, after we click the &amp;lt;code&amp;gt;Save dependency&amp;lt;/code&amp;gt; button, and click &amp;lt;code&amp;gt;show dependency graph&amp;lt;/code&amp;gt; button, the dependency graph is shown below:&lt;br /&gt;
[[File:show_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
==='''Test'''===&lt;br /&gt;
&lt;br /&gt;
==='''Deploy on VCL'''===&lt;br /&gt;
&lt;br /&gt;
* Visit http://vcl.ncsu.edu/ &amp;gt; Make a Reservation&lt;br /&gt;
* Select Ruby on Rails / Expertiza from the &amp;quot;Please select the environment ...&amp;quot; dropdown, select a duration, and then click Create Reservation&lt;br /&gt;
* Once the reservation is available, click Connect&lt;br /&gt;
* Follow the instructions on the connect screen (connect via SSH and then VNC). Connecting to SSH starts up VNC, the graphical environment to which you will connect.&lt;br /&gt;
* When connecting for the first time, it will prompt you for a password to access your (VNC) desktop. You can use any password, and it will be saved for later sessions.&lt;br /&gt;
* Follow the instructions given to connect to VNC. It is recommended to use [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0CB0QFjAA&amp;amp;url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fvnc%25C2%25AE-viewer-for-google-ch%2Fiabmpiboiopbgfabjmgeedhcmjenhbla&amp;amp;ei=LEY7Veq8C8GNNrvhgegI&amp;amp;usg=AFQjCNGxB1W4GwZrwQWHyBfik1cbjvXMkw VNC Viewer for Google Chrome].&lt;br /&gt;
* Once connected to VNC, you should see Rubymine running.&lt;br /&gt;
* Open a terminal (Applications &amp;gt; Accessories &amp;gt; Terminal), try hitting &amp;lt;ctrl&amp;gt;-C to kill pending task if your terminal does not work properly.&lt;br /&gt;
* Ensure you have at least 20M disk quota available: fs lq . You can allocate more space at https://sysnews.ncsu.edu/tools-bin/usmdb-quota&lt;br /&gt;
* Clone the git repository: git clone (expertiza repository URL)&lt;br /&gt;
* Change to the directory (cd expertiza). You may create a &amp;quot;database.yml&amp;quot; file based on &amp;quot;database.yml.example&amp;quot;.&lt;br /&gt;
* Use rvm use (ruby version) to switch to proper ruby version. Then run bundle install (you may need to downgrade the bundler to avoid bundle install failure) and rake db:migrate to set up development environment.&lt;br /&gt;
* Use &amp;quot;rails s -b 0.0.0.0&amp;quot; to start server which allows the access outside VCL by using url: VCL_ip:3000.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96946</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96946"/>
		<updated>2015-04-25T19:31:37Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Workflow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Workflow'''==&lt;br /&gt;
&lt;br /&gt;
==='''Set topics staggered deadline'''===&lt;br /&gt;
At very beginning, we find that the type of &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; variable &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt;. However, we found that many attributes used not belonging to &amp;lt;code&amp;gt;SignUpTopics&amp;lt;/code&amp;gt; class. So we deceide to use has tables instead. In order to keep update the staggered deadline, we put this variable in session. We also comprehended the relationship of corresponding tables. The original due dates are stored in &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; table. And staggered-deadlines are stored in &amp;lt;code&amp;gt;TopicDeadline&amp;lt;/code&amp;gt; table. This table also stores different deadline types.&lt;br /&gt;
&lt;br /&gt;
==='''Save topics dependency and show dependency graph'''===&lt;br /&gt;
In edit signup sheet for assignment, we want to save topic dependency and show the depandency graph, as show below:&lt;br /&gt;
[[File:save_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
In order to show the dependency graph, we must first save topics dependency and save the topic dependency graph under &amp;lt;code&amp;gt; public/assets/staggered_deadline_assignment_graph &amp;lt;/code&amp;gt; path. We first add new method in 'due_date' model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.assign_start_due_date(assignment_id, set_of_topics)&lt;br /&gt;
&lt;br /&gt;
    #Remember, in create_common_start_time_topics function we reversed the graph so reverse it back&lt;br /&gt;
    set_of_topics = set_of_topics.reverse&lt;br /&gt;
&lt;br /&gt;
    set_of_topics_due_dates = Array.new&lt;br /&gt;
    i=0&lt;br /&gt;
    days_between_submissions = Assignment.find(assignment_id)['days_between_submissions'].to_i&lt;br /&gt;
    set_of_topics.each { |set_of_topic|&lt;br /&gt;
      set_of_due_dates = nil&lt;br /&gt;
      if i==0&lt;br /&gt;
        #take the first set from the table which user stores&lt;br /&gt;
        set_of_due_dates = DueDate.where(assignment_id)&lt;br /&gt;
        offset = 0&lt;br /&gt;
      else&lt;br /&gt;
        set_of_due_dates = TopicDeadline.where(set_of_topics[i-1][0])&lt;br /&gt;
        set_of_due_dates.sort_by { |a, b| a.due_at &amp;lt;=&amp;gt; b.due_at }&lt;br /&gt;
        offset = days_between_submissions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      set_of_topic.each { |topic_id|&lt;br /&gt;
        #if the due dates have already been created and the save dependency is being clicked,&lt;br /&gt;
        #then delete existing n create again&lt;br /&gt;
        prev_saved_due_dates = TopicDeadline.where(topic_id)&lt;br /&gt;
&lt;br /&gt;
        #Only if there is a dependency for the topic&lt;br /&gt;
        if !prev_saved_due_dates.nil?&lt;br /&gt;
          num_due_dates = prev_saved_due_dates.length&lt;br /&gt;
          #for each due date in the current topic he want to compare it to the previous due date&lt;br /&gt;
          for x in 0..num_due_dates - 1&lt;br /&gt;
            #we don't want the old date to move earlier in time so we save it as the new due date and destroy the old one  &lt;br /&gt;
            if DateTime.parse(set_of_due_dates[x].due_at.to_s) + offset.to_i &amp;lt; DateTime.parse(prev_saved_due_dates[x].due_at.to_s)&lt;br /&gt;
              set_of_due_dates[x] = prev_saved_due_dates[x]&lt;br /&gt;
              offset = 0&lt;br /&gt;
            end&lt;br /&gt;
            prev_saved_due_dates[x].destroy&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        set_of_due_dates.each { |due_date|&lt;br /&gt;
          create_topic_deadline(due_date, offset, topic_id)&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      i = i+1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change the &amp;lt;code&amp;gt;save_topic_dependencies&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt; sign_up_sheet_controller.rb &amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
492 - redirect_to_sign_up(params[:assignment_id])&lt;br /&gt;
493 + redirect_to :action =&amp;gt; 'add_signup_topics_staggered', :id =&amp;gt; params[:assignment_id] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we use &amp;lt;code&amp;gt;RGL:Graph#write_to_graphic_file&amp;lt;/code&amp;gt; method to turn the dependency graph into &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file, we need to install graphviz in our gems. Otherwise, the RGL will uses &amp;lt;code&amp;gt;dot&amp;lt;/code&amp;gt; files as an intermediary format to produce image formats. If we download the &amp;lt;code&amp;gt;GraphViz&amp;lt;/code&amp;gt; packege, RGL will invoke it to produce a &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'graphviz' &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, after we click the &amp;lt;code&amp;gt;Save dependency&amp;lt;/code&amp;gt; button, and click &amp;lt;code&amp;gt;show dependency graph&amp;lt;/code&amp;gt; button, the dependency graph is shown below:&lt;br /&gt;
[[File:show_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
==='''Test'''===&lt;br /&gt;
&lt;br /&gt;
==='''Deploy on VCL'''===&lt;br /&gt;
&lt;br /&gt;
* Visit http://vcl.ncsu.edu/ &amp;gt; Make a Reservation&lt;br /&gt;
* Select Ruby on Rails / Expertiza from the &amp;quot;Please select the environment ...&amp;quot; dropdown, select a duration, and then click Create Reservation&lt;br /&gt;
* Once the reservation is available, click Connect&lt;br /&gt;
* Follow the instructions on the connect screen (connect via SSH and then VNC). Connecting to SSH starts up VNC, the graphical environment to which you will connect.&lt;br /&gt;
* When connecting for the first time, it will prompt you for a password to access your (VNC) desktop. You can use any password, and it will be saved for later sessions.&lt;br /&gt;
* Follow the instructions given to connect to VNC. It is recommended to use [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0CB0QFjAA&amp;amp;url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fvnc%25C2%25AE-viewer-for-google-ch%2Fiabmpiboiopbgfabjmgeedhcmjenhbla&amp;amp;ei=LEY7Veq8C8GNNrvhgegI&amp;amp;usg=AFQjCNGxB1W4GwZrwQWHyBfik1cbjvXMkw VNC Viewer for Google Chrome].&lt;br /&gt;
* Once connected to VNC, you should see Rubymine running.&lt;br /&gt;
* Open a terminal (Applications &amp;gt; Accessories &amp;gt; Terminal), try hitting &amp;lt;ctrl&amp;gt;-C to kill pending task if your terminal does not work properly.&lt;br /&gt;
* Ensure you have at least 20M disk quota available: fs lq . You can allocate more space at https://sysnews.ncsu.edu/tools-bin/usmdb-quota&lt;br /&gt;
* Clone the git repository: git clone (expertiza repository URL)&lt;br /&gt;
* Change to the directory (cd expertiza). You may create a &amp;quot;database.yml&amp;quot; file based on &amp;quot;database.yml.example&amp;quot;.&lt;br /&gt;
* Use rvm use (ruby version) to switch to proper ruby version. Then run bundle install (you may need to downgrade the bundler to avoid bundle install failure) and rake db:migrate to set up development environment.&lt;br /&gt;
* Use &amp;quot;rails s -b 0.0.0.0&amp;quot; to start server which allows the access outside VCL by using url: VCL_ip:3000.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96945</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96945"/>
		<updated>2015-04-25T19:30:09Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Set topics staggered deadline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Workflow'''==&lt;br /&gt;
&lt;br /&gt;
==='''Set topics staggered deadline'''===&lt;br /&gt;
At very beginning, we find that the type of ```due_date``` variable ```SignUpTopics```. However, we found that many attributes used not belonging to ```SignUpTopics``` class. So we deceide to use has tables instead. In order to keep update the staggered deadline, we put this variable in session. We also comprehended the relationship of corresponding tables. The original due dates are stored in ```due_date``` table. And staggered-deadlines are stored in ```TopicDeadline``` table. This table also stores different deadline types.&lt;br /&gt;
&lt;br /&gt;
==='''Save topics dependency and show dependency graph'''===&lt;br /&gt;
In edit signup sheet for assignment, we want to save topic dependency and show the depandency graph, as show below:&lt;br /&gt;
[[File:save_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
In order to show the dependency graph, we must first save topics dependency and save the topic dependency graph under &amp;lt;code&amp;gt; public/assets/staggered_deadline_assignment_graph &amp;lt;/code&amp;gt; path. We first add new method in 'due_date' model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.assign_start_due_date(assignment_id, set_of_topics)&lt;br /&gt;
&lt;br /&gt;
    #Remember, in create_common_start_time_topics function we reversed the graph so reverse it back&lt;br /&gt;
    set_of_topics = set_of_topics.reverse&lt;br /&gt;
&lt;br /&gt;
    set_of_topics_due_dates = Array.new&lt;br /&gt;
    i=0&lt;br /&gt;
    days_between_submissions = Assignment.find(assignment_id)['days_between_submissions'].to_i&lt;br /&gt;
    set_of_topics.each { |set_of_topic|&lt;br /&gt;
      set_of_due_dates = nil&lt;br /&gt;
      if i==0&lt;br /&gt;
        #take the first set from the table which user stores&lt;br /&gt;
        set_of_due_dates = DueDate.where(assignment_id)&lt;br /&gt;
        offset = 0&lt;br /&gt;
      else&lt;br /&gt;
        set_of_due_dates = TopicDeadline.where(set_of_topics[i-1][0])&lt;br /&gt;
        set_of_due_dates.sort_by { |a, b| a.due_at &amp;lt;=&amp;gt; b.due_at }&lt;br /&gt;
        offset = days_between_submissions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      set_of_topic.each { |topic_id|&lt;br /&gt;
        #if the due dates have already been created and the save dependency is being clicked,&lt;br /&gt;
        #then delete existing n create again&lt;br /&gt;
        prev_saved_due_dates = TopicDeadline.where(topic_id)&lt;br /&gt;
&lt;br /&gt;
        #Only if there is a dependency for the topic&lt;br /&gt;
        if !prev_saved_due_dates.nil?&lt;br /&gt;
          num_due_dates = prev_saved_due_dates.length&lt;br /&gt;
          #for each due date in the current topic he want to compare it to the previous due date&lt;br /&gt;
          for x in 0..num_due_dates - 1&lt;br /&gt;
            #we don't want the old date to move earlier in time so we save it as the new due date and destroy the old one  &lt;br /&gt;
            if DateTime.parse(set_of_due_dates[x].due_at.to_s) + offset.to_i &amp;lt; DateTime.parse(prev_saved_due_dates[x].due_at.to_s)&lt;br /&gt;
              set_of_due_dates[x] = prev_saved_due_dates[x]&lt;br /&gt;
              offset = 0&lt;br /&gt;
            end&lt;br /&gt;
            prev_saved_due_dates[x].destroy&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        set_of_due_dates.each { |due_date|&lt;br /&gt;
          create_topic_deadline(due_date, offset, topic_id)&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      i = i+1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change the &amp;lt;code&amp;gt;save_topic_dependencies&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt; sign_up_sheet_controller.rb &amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
492 - redirect_to_sign_up(params[:assignment_id])&lt;br /&gt;
493 + redirect_to :action =&amp;gt; 'add_signup_topics_staggered', :id =&amp;gt; params[:assignment_id] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we use &amp;lt;code&amp;gt;RGL:Graph#write_to_graphic_file&amp;lt;/code&amp;gt; method to turn the dependency graph into &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file, we need to install graphviz in our gems. Otherwise, the RGL will uses &amp;lt;code&amp;gt;dot&amp;lt;/code&amp;gt; files as an intermediary format to produce image formats. If we download the &amp;lt;code&amp;gt;GraphViz&amp;lt;/code&amp;gt; packege, RGL will invoke it to produce a &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'graphviz' &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, after we click the &amp;lt;code&amp;gt;Save dependency&amp;lt;/code&amp;gt; button, and click &amp;lt;code&amp;gt;show dependency graph&amp;lt;/code&amp;gt; button, the dependency graph is shown below:&lt;br /&gt;
[[File:show_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
==='''Test'''===&lt;br /&gt;
&lt;br /&gt;
==='''Deploy on VCL'''===&lt;br /&gt;
&lt;br /&gt;
* Visit http://vcl.ncsu.edu/ &amp;gt; Make a Reservation&lt;br /&gt;
* Select Ruby on Rails / Expertiza from the &amp;quot;Please select the environment ...&amp;quot; dropdown, select a duration, and then click Create Reservation&lt;br /&gt;
* Once the reservation is available, click Connect&lt;br /&gt;
* Follow the instructions on the connect screen (connect via SSH and then VNC). Connecting to SSH starts up VNC, the graphical environment to which you will connect.&lt;br /&gt;
* When connecting for the first time, it will prompt you for a password to access your (VNC) desktop. You can use any password, and it will be saved for later sessions.&lt;br /&gt;
* Follow the instructions given to connect to VNC. It is recommended to use [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0CB0QFjAA&amp;amp;url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fvnc%25C2%25AE-viewer-for-google-ch%2Fiabmpiboiopbgfabjmgeedhcmjenhbla&amp;amp;ei=LEY7Veq8C8GNNrvhgegI&amp;amp;usg=AFQjCNGxB1W4GwZrwQWHyBfik1cbjvXMkw VNC Viewer for Google Chrome].&lt;br /&gt;
* Once connected to VNC, you should see Rubymine running.&lt;br /&gt;
* Open a terminal (Applications &amp;gt; Accessories &amp;gt; Terminal), try hitting &amp;lt;ctrl&amp;gt;-C to kill pending task if your terminal does not work properly.&lt;br /&gt;
* Ensure you have at least 20M disk quota available: fs lq . You can allocate more space at https://sysnews.ncsu.edu/tools-bin/usmdb-quota&lt;br /&gt;
* Clone the git repository: git clone (expertiza repository URL)&lt;br /&gt;
* Change to the directory (cd expertiza). You may create a &amp;quot;database.yml&amp;quot; file based on &amp;quot;database.yml.example&amp;quot;.&lt;br /&gt;
* Use rvm use (ruby version) to switch to proper ruby version. Then run bundle install (you may need to downgrade the bundler to avoid bundle install failure) and rake db:migrate to set up development environment.&lt;br /&gt;
* Use &amp;quot;rails s -b 0.0.0.0&amp;quot; to start server which allows the access outside VCL by using url: VCL_ip:3000.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96944</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96944"/>
		<updated>2015-04-25T19:25:46Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Set topics staggered deadline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Workflow'''==&lt;br /&gt;
&lt;br /&gt;
==='''Set topics staggered deadline'''===&lt;br /&gt;
At very beginning, we find that the type of ```due_date``` variable ```SignUpTopics```. However, we found that many attributes used not belonging to ```SignUpTopics``` class. So we deceide to use has tables instead. In order to keep update the staggered deadline, we put this variable in session.&lt;br /&gt;
&lt;br /&gt;
==='''Save topics dependency and show dependency graph'''===&lt;br /&gt;
In edit signup sheet for assignment, we want to save topic dependency and show the depandency graph, as show below:&lt;br /&gt;
[[File:save_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
In order to show the dependency graph, we must first save topics dependency and save the topic dependency graph under &amp;lt;code&amp;gt; public/assets/staggered_deadline_assignment_graph &amp;lt;/code&amp;gt; path. We first add new method in 'due_date' model:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def self.assign_start_due_date(assignment_id, set_of_topics)&lt;br /&gt;
&lt;br /&gt;
    #Remember, in create_common_start_time_topics function we reversed the graph so reverse it back&lt;br /&gt;
    set_of_topics = set_of_topics.reverse&lt;br /&gt;
&lt;br /&gt;
    set_of_topics_due_dates = Array.new&lt;br /&gt;
    i=0&lt;br /&gt;
    days_between_submissions = Assignment.find(assignment_id)['days_between_submissions'].to_i&lt;br /&gt;
    set_of_topics.each { |set_of_topic|&lt;br /&gt;
      set_of_due_dates = nil&lt;br /&gt;
      if i==0&lt;br /&gt;
        #take the first set from the table which user stores&lt;br /&gt;
        set_of_due_dates = DueDate.where(assignment_id)&lt;br /&gt;
        offset = 0&lt;br /&gt;
      else&lt;br /&gt;
        set_of_due_dates = TopicDeadline.where(set_of_topics[i-1][0])&lt;br /&gt;
        set_of_due_dates.sort_by { |a, b| a.due_at &amp;lt;=&amp;gt; b.due_at }&lt;br /&gt;
        offset = days_between_submissions&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
      set_of_topic.each { |topic_id|&lt;br /&gt;
        #if the due dates have already been created and the save dependency is being clicked,&lt;br /&gt;
        #then delete existing n create again&lt;br /&gt;
        prev_saved_due_dates = TopicDeadline.where(topic_id)&lt;br /&gt;
&lt;br /&gt;
        #Only if there is a dependency for the topic&lt;br /&gt;
        if !prev_saved_due_dates.nil?&lt;br /&gt;
          num_due_dates = prev_saved_due_dates.length&lt;br /&gt;
          #for each due date in the current topic he want to compare it to the previous due date&lt;br /&gt;
          for x in 0..num_due_dates - 1&lt;br /&gt;
            #we don't want the old date to move earlier in time so we save it as the new due date and destroy the old one  &lt;br /&gt;
            if DateTime.parse(set_of_due_dates[x].due_at.to_s) + offset.to_i &amp;lt; DateTime.parse(prev_saved_due_dates[x].due_at.to_s)&lt;br /&gt;
              set_of_due_dates[x] = prev_saved_due_dates[x]&lt;br /&gt;
              offset = 0&lt;br /&gt;
            end&lt;br /&gt;
            prev_saved_due_dates[x].destroy&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        set_of_due_dates.each { |due_date|&lt;br /&gt;
          create_topic_deadline(due_date, offset, topic_id)&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      i = i+1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change the &amp;lt;code&amp;gt;save_topic_dependencies&amp;lt;/code&amp;gt; method in &amp;lt;code&amp;gt; sign_up_sheet_controller.rb &amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
492 - redirect_to_sign_up(params[:assignment_id])&lt;br /&gt;
493 + redirect_to :action =&amp;gt; 'add_signup_topics_staggered', :id =&amp;gt; params[:assignment_id] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since we use &amp;lt;code&amp;gt;RGL:Graph#write_to_graphic_file&amp;lt;/code&amp;gt; method to turn the dependency graph into &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file, we need to install graphviz in our gems. Otherwise, the RGL will uses &amp;lt;code&amp;gt;dot&amp;lt;/code&amp;gt; files as an intermediary format to produce image formats. If we download the &amp;lt;code&amp;gt;GraphViz&amp;lt;/code&amp;gt; packege, RGL will invoke it to produce a &amp;lt;code&amp;gt;jpg&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem 'graphviz' &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, after we click the &amp;lt;code&amp;gt;Save dependency&amp;lt;/code&amp;gt; button, and click &amp;lt;code&amp;gt;show dependency graph&amp;lt;/code&amp;gt; button, the dependency graph is shown below:&lt;br /&gt;
[[File:show_denpendency.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
==='''Test'''===&lt;br /&gt;
&lt;br /&gt;
==='''Deploy on VCL'''===&lt;br /&gt;
&lt;br /&gt;
* Visit http://vcl.ncsu.edu/ &amp;gt; Make a Reservation&lt;br /&gt;
* Select Ruby on Rails / Expertiza from the &amp;quot;Please select the environment ...&amp;quot; dropdown, select a duration, and then click Create Reservation&lt;br /&gt;
* Once the reservation is available, click Connect&lt;br /&gt;
* Follow the instructions on the connect screen (connect via SSH and then VNC). Connecting to SSH starts up VNC, the graphical environment to which you will connect.&lt;br /&gt;
* When connecting for the first time, it will prompt you for a password to access your (VNC) desktop. You can use any password, and it will be saved for later sessions.&lt;br /&gt;
* Follow the instructions given to connect to VNC. It is recommended to use [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;uact=8&amp;amp;ved=0CB0QFjAA&amp;amp;url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fvnc%25C2%25AE-viewer-for-google-ch%2Fiabmpiboiopbgfabjmgeedhcmjenhbla&amp;amp;ei=LEY7Veq8C8GNNrvhgegI&amp;amp;usg=AFQjCNGxB1W4GwZrwQWHyBfik1cbjvXMkw VNC Viewer for Google Chrome].&lt;br /&gt;
* Once connected to VNC, you should see Rubymine running.&lt;br /&gt;
* Open a terminal (Applications &amp;gt; Accessories &amp;gt; Terminal), try hitting &amp;lt;ctrl&amp;gt;-C to kill pending task if your terminal does not work properly.&lt;br /&gt;
* Ensure you have at least 20M disk quota available: fs lq . You can allocate more space at https://sysnews.ncsu.edu/tools-bin/usmdb-quota&lt;br /&gt;
* Clone the git repository: git clone (expertiza repository URL)&lt;br /&gt;
* Change to the directory (cd expertiza). You may create a &amp;quot;database.yml&amp;quot; file based on &amp;quot;database.yml.example&amp;quot;.&lt;br /&gt;
* Use rvm use (ruby version) to switch to proper ruby version. Then run bundle install (you may need to downgrade the bundler to avoid bundle install failure) and rake db:migrate to set up development environment.&lt;br /&gt;
* Use &amp;quot;rails s -b 0.0.0.0&amp;quot; to start server which allows the access outside VCL by using url: VCL_ip:3000.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96915</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96915"/>
		<updated>2015-04-24T02:58:03Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Workflow'''==&lt;br /&gt;
&lt;br /&gt;
==='''Set topics staggered deadline'''===&lt;br /&gt;
&lt;br /&gt;
==='''Save topics dependency and show dependency graph'''===&lt;br /&gt;
&lt;br /&gt;
==='''Test'''===&lt;br /&gt;
&lt;br /&gt;
==='''Deploy on VCL'''===&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96641</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96641"/>
		<updated>2015-04-11T15:16:23Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Design Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96640</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96640"/>
		<updated>2015-04-11T15:15:45Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Design Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller. ''Model–view–controller''.]&amp;lt;/ref&amp;gt;&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. ''Publish–subscribe pattern''. Wikipedia]&amp;lt;/ref&amp;gt;&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96639</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96639"/>
		<updated>2015-04-11T15:13:56Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Design Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* '''MVC'''&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* '''Publish-subscribe'''&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96638</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96638"/>
		<updated>2015-04-11T15:13:20Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
* MVC&lt;br /&gt;
**Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.&lt;br /&gt;
**We need to modify model, view and controller in order to fix this functionality.&lt;br /&gt;
&lt;br /&gt;
* Publish-subscribe&lt;br /&gt;
**In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages are characterized into classes, without knowledge of what, if any, subscribers there may be. Similarly, subscribers express interest in one or more classes, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.&lt;br /&gt;
** When instructor set an assignment as staggered-dealine assignment, in theory, all the students will know. And students can apply for staggered-deadline assignment if they have some trouble to  finish their homework on time.&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96637</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96637"/>
		<updated>2015-04-11T15:05:20Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96636</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96636"/>
		<updated>2015-04-11T15:05:07Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
'''Controller'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/5c7c8579b6fe44e19f96183af43fab26cd26d1d1/app/controllers/sign_up_sheet_controller.rb sign_up_sheet_controller.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Model'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/142a9134a18bd7cc552c6937fe5c93a1e0f4947d/app/models/assignment_form.rb assignment_form.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/72b61129c70a88d1c1ae814a53cb83b6a15a3fa8/app/models/assignment.rb assignment.rb]&lt;br /&gt;
&lt;br /&gt;
'''View'''&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/3443fe119ee4ae02c676131b07cd42c2771f88e5/app/views/sign_up_sheet/add_signup_topics_staggered.html.erb add_signup_topics_staggered.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/651176622bff84b09c7de9f745a246279501deb8/app/views/tree_display/actions/_assignments_actions.html.erb _assignments_actions.html.erb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/f2495041c0d66ee5d35c3da23d45e043072f7a1c/app/views/sign_up_sheet/_table_header.html.erb _table_header.html.erb]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96635</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96635"/>
		<updated>2015-04-11T14:57:26Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Problem Analyse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analysis'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96634</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96634"/>
		<updated>2015-04-11T14:56:33Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analyse'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''Related materials'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96633</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96633"/>
		<updated>2015-04-11T14:54:23Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Initial Analyse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester's 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would've been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones' work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can't write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
=='''Problem Analyse'''==&lt;br /&gt;
* After discussing with professor, the &amp;quot;sign up sheet&amp;quot; icon in assignment pop up panel should be moved. Because that icon has the same functionality as &amp;quot;topic&amp;quot; panel in assignment edit window. These work has already done by [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Spring_2015/oss_E1509_lds OSS1509]. So we have to move all the staggered-deadline realted code to the [https://github.com/expertiza/expertiza/blob/rails4/app/controllers/assignments_controller.rb assignments_controller.rb] and [https://github.com/expertiza/expertiza/blob/rails4/app/views/assignments/edit.html.erb assignments/edit.html.erb].&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn't have a column &amp;quot;t_id&amp;quot;, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class &amp;quot;DueData&amp;quot; does exist, but it does not have column &amp;quot;topic_identifier&amp;quot; or &amp;quot;topic_name&amp;quot;. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]''' Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96216</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96216"/>
		<updated>2015-04-01T01:12:41Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester’s 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would’ve been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones’ work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can’t write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Initial Analyse'''==&lt;br /&gt;
In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn’t have a column “t_id”, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class “DueData” does exist, but it does not have column “topic_identifier” or “topic_name”. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]'' 'Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96215</id>
		<title>CSC/ECE 517 Spring 2015 S1524 FSZZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_S1524_FSZZ&amp;diff=96215"/>
		<updated>2015-04-01T01:12:10Z</updated>

		<summary type="html">&lt;p&gt;Zhu6: /* Puzzle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1524. Refactor staggered-deadline assignments&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''Overview'''==&lt;br /&gt;
===Introduction to Expertiza===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities&amp;lt;ref&amp;gt;[https://github.com/expertiza/expertiza Expertiza. Github]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Staggered Deadlines===&lt;br /&gt;
Staggered deadlines involve planning alternate submission dates for papers, projects, or exams when a student has conflicting due dates for these.  The key part of staggered deadlines is the planning. Staggered deadlines are always established well in advance of the scheduled due date. It is the advanced planning of these deadlines that makes them &amp;quot;staggered deadlines&amp;quot; rather than extensions&amp;lt;ref&amp;gt;[http://pages.vassar.edu/accessingvassar/2013/01/15/difficulties-with-staggered-deadlines/ Elmichaels. ''Difficulties with Staggered Deadlines''. Jan 15, 2013]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=='''Documentation'''==&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/reports/Instructor_documentation.doc instructor manual], explaining how to create an deploy an assignment in Expertiza.&lt;br /&gt;
*An [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/instructor.swf instructor video], slightly dated, showing how to create and deploy an assignment&lt;br /&gt;
* A guide for [[Creating_Custom_Rubric]]&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_documentation.pdf PDF] presentation explaining how to submit and review an assignment with Expertiza.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/videos/student.swf video] showing how to use the system to submit and review an assignment.&lt;br /&gt;
*For students, a [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.ppt Powerpoint] or [http://research.csc.ncsu.edu/efg/expertiza/presentations/student_wiki_documentation.pdf PDF] presentation explaining how to submit and review wiki pages with Expertiza.&lt;br /&gt;
*For students, a [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.ppt Powerpoint] or [http://courses.ncsu.edu/csc517/common/homework/topic-signup-team-formation.pdf PDF] presentation explaining how to form teams and sign up for topics&amp;lt;ref&amp;gt;[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza. Wolfwikis]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Background'''===&lt;br /&gt;
In this semester’s 517 class.  Wiki 1a and Wiki 1b are structured as separate assignments, with separate signup sheets, teams, and reviews.  But really, since only one of the two was done by any student, it would’ve been better to have a single assignment.  Still, some topics could be done soon after the course started, whereas others were better done after we had studied related topics in class.&lt;br /&gt;
&lt;br /&gt;
==='''Staggered-deadline Assignment'''===&lt;br /&gt;
This raises the idea of a ''staggered-deadline assignment'', where different topics have different submission and review deadlines, rather than all topics having the same deadline. &lt;br /&gt;
&lt;br /&gt;
==='''Benefit'''===&lt;br /&gt;
* '''Easy to manage.''' Because in the past, instructor has to build two separate assignments for Wiki 1a and 1b, now one assignment for Wiki is enough. &lt;br /&gt;
&lt;br /&gt;
* '''Increase flexibility.''' For instance, when an OSS team facing a much more difficult problem than other teams, instructor may postpone their deadline several days. It will make Expertiza more humanize.&lt;br /&gt;
&lt;br /&gt;
* '''Take time to do calibration.''' We find that two Wiki assignments started at Jan. 28th and ended at Feb. 25th, which takes too much time. And with staggered-deadline assignment, we can distribute less time on them. And we can take redundant time to do calibrating. Because we find that many students actually do not know how to evaluate other ones’ work, even there are some rubrics offered. So we recommend to let students grade sample assignments first, then calibrate their grading behaviors. Although it will take some time, we consider it is important to help students distinguish good assignments from common ones.&lt;br /&gt;
&lt;br /&gt;
=='''Product Verion Functionality'''==&lt;br /&gt;
* In production version, instructor can set ''Submission deadline'', ''Review deadline'' and ''Metareview deadline'' for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments_M.png‎  |frame|center|Set different deadline for each topic]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Also, instructor can set the dependencies of different topics. And there is a dependency graph generated automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Staggered-deadline_assignments1_M.png‎  |frame|center|Dependency graph for all topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Use Case'''==&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #1: Create staggered-deadline assignment'''&lt;br /&gt;
** '''Actor:''' Instructor&lt;br /&gt;
** '''Actions:''' &lt;br /&gt;
*** Instructor logs in Expertiza.&lt;br /&gt;
*** Instructor creates a new staggered-deadline assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #2: Peer review only'''&lt;br /&gt;
** '''Actor:''' Student finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Hand in assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
*** Write author feedback to reviewer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Use Case #3: Peer review and still work on assignments'''&lt;br /&gt;
** '''Actor:''' Student not finish work for first round&lt;br /&gt;
** '''Actions:'''&lt;br /&gt;
*** Sign up topic.&lt;br /&gt;
*** Work on assignment.&lt;br /&gt;
*** Peer review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram1_M.png‎  |frame|center|Use Case Diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Error Message Present'''==&lt;br /&gt;
* First, login expertiza, in the &amp;quot;Manage Content&amp;quot; page, create a new assignment. Then, as shown below, choose the &amp;quot;pencil&amp;quot; icon to edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment1.jpg |frame|center|Assignment panel 1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Check&amp;quot;Has topics?&amp;quot; and &amp;quot;Staggered deadline assignment?&amp;quot; two checkbox, and create new topics in &amp;quot;Topics&amp;quot; panel, click &amp;quot;save&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment2.jpg |frame|center|Create Topics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Back to the &amp;quot;Manage Content&amp;quot; page, choose the &amp;quot;Edit signup sheet&amp;quot; icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment3.jpg |frame|center|Assignment panel 2]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Error: can’t write unknown attribute 't_id'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:assignment4.jpg |frame|center|Error]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Initial Analyse'''==&lt;br /&gt;
In &amp;quot;sign_up_sheet_controller&amp;quot;, there are several errors and confusions in function &amp;quot;add_sign_up_topic&amp;quot;. The function is used to display a page that lists all the available topics for a staggered-deadline assignment.&amp;lt;br&amp;gt; &lt;br /&gt;
See the function code below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_signup_topic&lt;br /&gt;
  load_add_signup_topics(params[:id])&lt;br /&gt;
&lt;br /&gt;
  @review_rounds = Assignment.find(params[:id]).get_review_rounds&lt;br /&gt;
  @topics = SignUpTopic.where(assignment_id: params[:id])&lt;br /&gt;
&lt;br /&gt;
  #Use this until you figure out how to initialize this array&lt;br /&gt;
  @duedates = SignUpTopic.find_by_sql(&amp;quot;SELECT s.id as topic_id FROM sign_up_topics s WHERE s.assignment_id = &amp;quot; + params[:id].to_s)&lt;br /&gt;
&lt;br /&gt;
  unless @topics.nil?&lt;br /&gt;
    i=0&lt;br /&gt;
    @topics.each { |topic|&lt;br /&gt;
&lt;br /&gt;
      @duedates[i]['t_id'] = topic.id&lt;br /&gt;
      @duedates[i]['topic_identifier'] = topic.topic_identifier&lt;br /&gt;
      @duedates[i]['topic_name'] = topic.topic_name&lt;br /&gt;
&lt;br /&gt;
      for j in 1..@review_rounds&lt;br /&gt;
        duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('submission').id).first&lt;br /&gt;
        duedate_rev = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('review').id).first&lt;br /&gt;
        if !duedate_subm.nil? &amp;amp;&amp;amp; !duedate_rev.nil?&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
          #the topic is new. so copy deadlines from assignment&lt;br /&gt;
          set_of_due_dates = DueDate.where(assignment_id: params[:id])&lt;br /&gt;
          set_of_due_dates.each { |due_date|&lt;br /&gt;
            create_topic_deadline(due_date, 0, topic.id)&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          @duedates[i]['submission_'+ j.to_s] = DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
          @duedates[i]['review_'+ j.to_s] = DateTime.parse(duedate_rev['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
      end&lt;br /&gt;
      duedate_subm = TopicDeadline.where(topic_id: topic.id, deadline_type_id:  DeadlineType.find_by_name('metareview').id).first&lt;br /&gt;
      @duedates[i]['submission_'+ (@review_rounds+1).to_s] = !(duedate_subm.nil?)?(DateTime.parse(duedate_subm['due_at'].to_s).strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)):nil&lt;br /&gt;
      i = i + 1&lt;br /&gt;
    }&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The main confusions are:&lt;br /&gt;
* In line 8, the variable &amp;quot;duedates&amp;quot; are declared as type &amp;quot;SignUpTopic&amp;quot;. The naming is quite confusing.&lt;br /&gt;
* In line 14, the SignUpTopic class doesn’t have a column “t_id”, it raises an error. We think it should be &amp;quot;topic_id&amp;quot;.&lt;br /&gt;
* From the code we can guess the variable &amp;quot;duedates&amp;quot; is used to store the deadline for each topic. The class “DueData” does exist, but it does not have column “topic_identifier” or “topic_name”. It only stores the deadline for a single assignment.&lt;br /&gt;
&lt;br /&gt;
=='''Puzzle'''==&lt;br /&gt;
* If there is more than one round, which means students can submit their assignments more than once, so the staggered-deadline should refer to which deadline?&lt;br /&gt;
'''[Professor]''' In a staggered-deadline assignment, there is one submission deadline and one review deadline per round.  These are always set on a per-topic basis.&lt;br /&gt;
If the view currently works (and I think it might), as soon as you make an assignment a staggered-deadline assignment, the Signup Sheet (Topics) page will have a link at the bottom to show deadlines for each topic.  Click it, and you will see a separate text box for each deadline for each topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If staggered-deadline of one assignment is even later than the second-round review, is it means that that assignment do not need peer review and go directly into meta-review stage?&lt;br /&gt;
'''[Professor]''' No, there are also separate meta-review deadlines for a staggered-deadline assignment.&lt;br /&gt;
I think in the current implementation, only submission deadlines, review deadlines, and meta-review deadlines vary by topic.  In a more complete implementation, there would be a way for ANY deadline to vary by topic.  This would include signup deadlines, drop-topic deadlines, team-formation deadlines, and any other kind of deadline that is defined later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When to set staggered-deadline assignments? Create assignment or Before submission?&lt;br /&gt;
'''[Professor]'' 'Basically, the staggered-deadline is set at the same time when an assignment is created. But if one team cannot hand in their work with sufficient reasons, instructor may extend the deadline of their topic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is the meaning of &amp;quot;dependencies&amp;quot; between topics?&lt;br /&gt;
'''[Professor]''' The ''dependencies'' of topics means one topic cannot start until another topic finishes. For instance, ''Ruby'' topic must be finished before ''Rails'' topic.&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zhu6</name></author>
	</entry>
</feed>