Skip to content

Commit

Permalink
added buttons for upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ingridh committed Apr 4, 2015
1 parent 924d8c3 commit 0cb88d7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
14 changes: 13 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,26 @@
padding: 0px;
}

#main {
margin: 20px;
}

h1, p {
margin: 0px;
padding: 0px;
}

a {
text-decoration: none;
}


a:link, a:visited, a:hover, a:active {
color: #2163E3;
}

.btn-primary, .btn-info {
//float: right;
margin: 20px 5px;
}

h1.title, p.welcome {
Expand Down
2 changes: 2 additions & 0 deletions app/views/instructor/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
-if @collections.empty?
%h3 You have no collections! Start one now.
=link_to 'start a new collection', new_collection_path, :class => 'btn btn-info', :id=> 'add_collection'
=link_to 'upload new questions', upload_path, :class => 'btn btn-primary', :id=> 'upload_questions'

-else

=link_to 'start a new collection', new_collection_path, :class => 'btn btn-info', :id=> 'add_collection'
=link_to 'upload new questions', upload_path, :class => 'btn btn-primary', :id=> 'upload_questions'

%div.col-md-10
%div.table-responsive
Expand Down
9 changes: 7 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@
ActiveRecord::Schema.define(:version => 20150404010702) do

create_table "collections", :force => true do |t|
t.integer "instructor_id"
t.string "name"
t.datetime "last_used"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "instructor_id"
end

create_table "collections_instructors", :id => false, :force => true do |t|
t.integer "collection_id"
t.integer "instructor_id"
end

create_table "collections_problems", :id => false, :force => true do |t|
Expand All @@ -38,7 +43,7 @@

create_table "problems", :force => true do |t|
t.integer "instructor_id"
t.text "text"
t.string "text"
t.datetime "created_date"
t.string "created_by"
t.boolean "is_public"
Expand Down
9 changes: 9 additions & 0 deletions text.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
quiz '' do
select_multiple do
text 'Which statements are TRUE regarding Rails routes and the resources to which they refer?'
answer 'In an MVC app, every valid route must eventually trigger a controller action.'
answer 'One common set of RESTful resource actions are the CRUD actions on models.'
distractor 'A route always contains one or more wildcard parameters, such as ":id", to identify the particular resource named in the operation.',
:explanation => "Some routes, such as those to list all resources of a given type or create a new resource of a given type, don't require any such identifier."
end
end

0 comments on commit 0cb88d7

Please sign in to comment.