mcpa-stlouis / hack-the-arch

Welcome to HackTheArch! A free open source scoring server for cyber Capture the Flag competitions!
https://hackthearch.herokuapp.com
MIT License
66 stars 27 forks source link

Docker Install issues #52

Closed eljeffeg closed 6 years ago

eljeffeg commented 6 years ago

On the docker install, I couldn't get this to run. docker-compose run web rails db:migrate It says: ERROR: Cannot start service web: oci runtime error: container_linux.go:262: starting container process caused "exec: \"rails\": executable file not found in $PATH"

I'd try a normal install, but I don't see good instructions for it if you're not looking to deploy this publicly on Heroku. This is my first time trying to use Ruby.. Seems way more complicated than Python, Node, or anything else... banging my head trying to get hack-the-arch running.

eljeffeg commented 6 years ago

Got a Virtual Machine download ready to go? haha

eljeffeg commented 6 years ago

I was able to get it running by following https://github.com/mcpa-stlouis/hack-the-arch/pull/50 instructions. It would be great if the changes suggested were made and it was merged.

paullj1 commented 6 years ago

So as I commented on that request, it is not a safe or efficient deployment of HTA. There may be security issues with hosting your CTF that way, and there will certainly be performance issues.

The reason Docker is suggested is because it is difficult to deploy a safe and effective production web application (regardless of the technology behind it). Docker makes that easier, but it still takes some understanding. If Docker and docker-compose are setup properly (and updated), then you shouldn’t have any issues running the database migration. How did you setup Docker?

On Thu, May 24, 2018 at 17:17 ElJefe notifications@github.com wrote:

Closed #52 https://github.com/mcpa-stlouis/hack-the-arch/issues/52.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mcpa-stlouis/hack-the-arch/issues/52#event-1645442225, or mute the thread https://github.com/notifications/unsubscribe-auth/AIb5BwPcdnZcTjwm0SqVswb3K836Hv6cks5t1zFcgaJpZM4UM6fB .

eljeffeg commented 6 years ago

I think I just apt-get install docker and did the same for docker-compose. Pretty much just followed the instructions https://github.com/mcpa-stlouis/hack-the-arch/blob/dev/DOCKER_README.md.

I ran into some issues, but was able to get them fixed along the way until this one. This is the first time I've tried to use Docker.

paullj1 commented 6 years ago

Usually, it's a much better idea to install docker from the source (it's easier than aptitude): Docker: https://docs.docker.com/install/linux/docker-ce/ubuntu/ docker-compose: https://docs.docker.com/compose/install/

paullj1 commented 6 years ago

That script will check to make sure the versions of docker and docker-compose are correct (amongst other things) to ensure you have a safe production deployment of HTA. Let me know if it doesn't work or you have any issues running it.

eljeffeg commented 6 years ago

I installed these as part of the setup with docker before running the script as it was necessary to run bundle exec rails secret.

apt-get install libpq-dev
gem install pg -v '0.18.4'
apt-get install nodejs

After that, the script seemed to run fine, however, it should be available on my host ip, but it's not visible on localhost.

eljeffeg commented 6 years ago

WARNING: HTA has not been tested with this version of Docker... continue at your own risk.

stat: cannot read file system information for '%m': No such file or directory start_docker.sh: 36: [: File:: unexpected operator Detected existing instance of HTA running... kill it, then restart... Removing hta_web_run_3 ... done Removing hta_web_run_2 ... done Removing hta_web_run_1 ... done Removing hta_web_1 ... done Removing hta_db_1 ... done Removing hta_rd_1 ... done Removing network hta_default Creating network "hta_default" with the default driver Creating hta_db_1 ... done Creating hta_rd_1 ... done Creating hta_web_1 ... done Starting hta_rd_1 ... done Starting hta_db_1 ... done (0.3ms) SELECT pg_try_advisory_lock(737815420147457505) (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC ActiveRecord::InternalMetadata Load (5.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]] (1.5ms) BEGIN (0.2ms) COMMIT (0.5ms) SELECT pg_advisory_unlock(737815420147457505) Starting hta_rd_1 ... done Starting hta_db_1 ... done (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC (0.4ms) BEGIN Setting Exists (3.0ms) SELECT 1 AS one FROM "settings" WHERE "settings"."name" = $1 LIMIT $2 [["name", "competition_name"], ["LIMIT", 1]] (0.5ms) ROLLBACK rails aborted! ActiveRecord::RecordInvalid: Validation failed: Name has already been taken /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/validations.rb:78:in raise_validation_error' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/validations.rb:50:insave!' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/attribute_methods/dirty.rb:43:in save!' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/transactions.rb:313:inblock in save!' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/transactions.rb:384:in block in with_transaction_returning_status' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235:inblock in transaction' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:194:in block in within_new_transaction' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:191:inwithin_new_transaction' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in transaction' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/transactions.rb:210:intransaction' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/transactions.rb:381:in with_transaction_returning_status' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/transactions.rb:313:insave!' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/suppressor.rb:46:in save!' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/persistence.rb:51:increate!' /opt/hta/db/seeds.rb:5:in <top (required)>' /usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:inload' /usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in block in load' /usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:inload_dependency' /usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in load' /usr/local/bundle/gems/railties-5.1.6/lib/rails/engine.rb:549:inload_seed' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/tasks/database_tasks.rb:270:in load_seed' /usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/railties/databases.rake:184:inblock (2 levels) in <top (required)>' /usr/local/bundle/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:21:in block in perform' /usr/local/bundle/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:18:inperform' /usr/local/bundle/gems/railties-5.1.6/lib/rails/command.rb:46:in invoke' /usr/local/bundle/gems/railties-5.1.6/lib/rails/commands.rb:16:in<top (required)>' bin/rails:4:in require' bin/rails:4:in

' Tasks: TOP => db:seed (See full trace by running task with --trace) Starting hta_rd_1 ... done Starting hta_db_1 ... done All done! HTA should now be browsable on your local IP!

paullj1 commented 6 years ago

So you don't necessarily need to run rails secret... it's just one way of generating a sufficiently long and random key.

Your migration failed. Looks like there are still remnants (and you might also have been successful in getting this going previously) from the first time. Run:

docker volume prune

to clean it up completely, then re-run the script. Also, if it says it's running, then it's running. Are you sure you're using the correct port (https://127.0.0.1, not https://127.0.0.1:3000).

paullj1 commented 6 years ago

Also, please read the output from the script. Please do not use the server keys that come bundled with the repo... the server can be MitM'd and your admin's session key can be stolen (giving whoever did it all of the answers).

eljeffeg commented 6 years ago

I reran the cert instructions, so hopefully that fixed the MitM issue, though I'll accept a cheat if they hack the answers. Ran docker volume purge, regstarted, reran the updated ./start_docker.sh

It was not accessible on https://127.0.0.1, http://127.0.0.1, nor https://127.0.0.1:3000

stat: cannot read file system information for '%m': No such file or directory
./start_docker.sh: 36: [: File:: unexpected operator
Detected existing instance of HTA running... kill it, then restart...
Removing hta_web_run_3 ... done
Removing hta_web_run_2 ... done
Removing hta_web_run_1 ... done
Removing hta_web_1     ... done
Removing hta_db_1      ... done
Removing hta_rd_1      ... done
Removing network hta_default
Creating network "hta_default" with the default driver
Creating hta_rd_1 ... done
Creating hta_db_1 ... done
Creating hta_web_1 ... done
Starting hta_db_1 ... done
Starting hta_rd_1 ... done
   (0.2ms)  SELECT pg_try_advisory_lock(737815420147457505)
   (1.8ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
  ActiveRecord::InternalMetadata Load (1.9ms)  SELECT  "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2  [["key", "environment"], ["LIMIT", 1]]
   (0.2ms)  BEGIN
   (0.2ms)  COMMIT
   (0.3ms)  SELECT pg_advisory_unlock(737815420147457505)
Starting hta_rd_1 ... done
Starting hta_db_1 ... done
   (0.8ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
   (0.3ms)  BEGIN
  Setting Exists (3.5ms)  SELECT  1 AS one FROM "settings" WHERE "settings"."name" = $1 LIMIT $2  [["name", "competition_name"], ["LIMIT", 1]]
   (0.3ms)  ROLLBACK
rails aborted!
ActiveRecord::RecordInvalid: Validation failed: Name has already been taken
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/validations.rb:78:in `raise_validation_error'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/validations.rb:50:in `save!'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/attribute_methods/dirty.rb:43:in `save!'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/transactions.rb:313:in `block in save!'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/transactions.rb:384:in `block in with_transaction_returning_status'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/transactions.rb:210:in `transaction'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/transactions.rb:381:in `with_transaction_returning_status'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/transactions.rb:313:in `save!'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/suppressor.rb:46:in `save!'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/persistence.rb:51:in `create!'
/opt/hta/db/seeds.rb:5:in `<top (required)>'
/usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `load'
/usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `block in load'
/usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `load'
/usr/local/bundle/gems/railties-5.1.6/lib/rails/engine.rb:549:in `load_seed'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/tasks/database_tasks.rb:270:in `load_seed'
/usr/local/bundle/gems/activerecord-5.1.6/lib/active_record/railties/databases.rake:184:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/usr/local/bundle/gems/railties-5.1.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/usr/local/bundle/gems/railties-5.1.6/lib/rails/command.rb:46:in `invoke'
/usr/local/bundle/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
Starting hta_db_1 ... done
Starting hta_rd_1 ... done
All done!  HTA should now be browsable on your local IP!
eljeffeg commented 6 years ago

I should note this is a linked VM prior to getting it working with the other instructions. So it's essentially a fairly clean Ubuntu 16.04 install. It does not have the prior stuff. When you asked me to redo it with the updated script, I started over to test the process.

eljeffeg commented 6 years ago

I can try to start over again, making sure I install all those dependent packages before running the script.

eljeffeg commented 6 years ago

Also noticed while installing the certs. echo "127.0.0.1 localhost.ssl" | sudo tee -a /private/etc/hosts This fails on Ubuntu as the host file is located in /etc/hosts

eljeffeg commented 6 years ago

So the vm restore, adding libpq-dev and nodejs beforehand, cert stuff, installing docker and then running the .start_docker.sh mostly worked.

I am now able to see the ctf on https://127.0.0.1, however, it looks like it's missing the CSS, images, etc. It's just text. Permissions issue? I have hack-the-arch installed at /usr/local/hack-the-arch

paullj1 commented 6 years ago

So you shouldn’t need to install anything other than Docker locally. The rails secret is just to generate a long random string (you could mash the keyboard for a few seconds and achieve the same result).

There shouldn’t be any permissions issues since the entire app is contained inside the container. You can run a “docker-compose logs web” to see if it’s generating any errors (ideally right after you refresh the page). On Sat, May 26, 2018 at 10:14 ElJefe notifications@github.com wrote:

So the restart, adding libpq-dev and nodejs beforehand, cert stuff, installing docker and then running the .start_docker.sh mostly worked.

I am now able to see the ctf on https://127.0.0.1, however, it looks like it's missing the CSS, images, etc. It's just text. Permissions issue? I have hack-the-arch installed at /usr/local/hack-the-arch

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/mcpa-stlouis/hack-the-arch/issues/52#issuecomment-392267734, or mute the thread https://github.com/notifications/unsubscribe-auth/AIb5B0zeTj6Eeu54w1i_OypXG_xNS4rIks5t2XFsgaJpZM4UM6fB .

eljeffeg commented 6 years ago

ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):

paullj1 commented 6 years ago

So the last in that script isn't running... you should see something like:

I, [2018-05-26T18:43:59.765644 #1] INFO -- : Writing /opt/hta/public/assets/mcpa-black-deb46bccaf49b862b786f4c4b336ed4c7b94a07b27967acfdda4e020c9ea6c8e.png I, [2018-05-26T18:44:09.850250 #1] INFO -- : Writing /opt/hta/public/assets/application-de9699ab82fc7be5759c573a734a5893fde6dbebf6c8beab6083826c58cff1fa.js I, [2018-05-26T18:44:09.850939 #1] INFO -- : Writing /opt/hta/public/assets/application-de9699ab82fc7be5759c573a734a5893fde6dbebf6c8beab6083826c58cff1fa.js.gz I, [2018-05-26T18:44:25.780865 #1] INFO -- : Writing /opt/hta/public/assets/application-bb2258f5dadecc2087acf2313c617d401afb3850262cdb60ee11db843f70a51d.css I, [2018-05-26T18:44:25.781097 #1] INFO -- : Writing /opt/hta/public/assets/application-bb2258f5dadecc2087acf2313c617d401afb3850262cdb60ee11db843f70a51d.css.gz I, [2018-05-26T18:44:25.781950 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407.eot I, [2018-05-26T18:44:25.782392 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407.eot.gz I, [2018-05-26T18:44:25.782772 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c.woff2 I, [2018-05-26T18:44:25.783239 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-a26394f7ede100ca118eff2eda08596275a9839b959c226e15439557a5a80742.woff I, [2018-05-26T18:44:25.783639 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456.ttf I, [2018-05-26T18:44:25.784333 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456.ttf.gz I, [2018-05-26T18:44:25.784619 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5.svg I, [2018-05-26T18:44:25.786833 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5.svg.gz

at the end (which generates the assets). I've now tested this on three separate systems (MacOS, Ubuntu 16.04, and Ubuntu 18.04), and they all work. All fresh installs and clones of the repo. Have you modified any of the content?

On Sat, May 26, 2018 at 12:09 PM ElJefe notifications@github.com wrote:

ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/mcpa-stlouis/hack-the-arch/issues/52#issuecomment-392274878, or mute the thread https://github.com/notifications/unsubscribe-auth/AIb5B7lr1EELWqXanHQElHtgvVDqHne0ks5t2YxEgaJpZM4UM6fB .

eljeffeg commented 6 years ago

I had installed a few things on it, but not much. Starting hta_rd_1 ... done Starting hta_db_1 ... done I, [2018-05-26T15:10:03.314544 #1] INFO -- : Writing /opt/hta/public/assets/mcpa-black-deb46bccaf49b862b786f4c4b336ed4c7b94a07b27967acfdda4e020c9ea6c8e.png I, [2018-05-26T15:10:14.746442 #1] INFO -- : Writing /opt/hta/public/assets/application-de9699ab82fc7be5759c573a734a5893fde6dbebf6c8beab6083826c58cff1fa.js I, [2018-05-26T15:10:14.754676 #1] INFO -- : Writing /opt/hta/public/assets/application-de9699ab82fc7be5759c573a734a5893fde6dbebf6c8beab6083826c58cff1fa.js.gz I, [2018-05-26T15:10:32.828753 #1] INFO -- : Writing /opt/hta/public/assets/application-bb2258f5dadecc2087acf2313c617d401afb3850262cdb60ee11db843f70a51d.css I, [2018-05-26T15:10:32.829255 #1] INFO -- : Writing /opt/hta/public/assets/application-bb2258f5dadecc2087acf2313c617d401afb3850262cdb60ee11db843f70a51d.css.gz I, [2018-05-26T15:10:32.829781 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407.eot I, [2018-05-26T15:10:32.830204 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407.eot.gz I, [2018-05-26T15:10:32.830754 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c.woff2 I, [2018-05-26T15:10:32.831250 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-a26394f7ede100ca118eff2eda08596275a9839b959c226e15439557a5a80742.woff I, [2018-05-26T15:10:32.838138 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456.ttf I, [2018-05-26T15:10:32.839208 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456.ttf.gz I, [2018-05-26T15:10:32.840234 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5.svg I, [2018-05-26T15:10:32.845852 #1] INFO -- : Writing /opt/hta/public/assets/bootstrap/glyphicons-halflings-regular-42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5.svg.gz All done! HTA should now be browsable on your local IP (https://127.0.0.1)!

eljeffeg commented 6 years ago

looking at my file system, there is no folder /opt/hta/ /opt is empty.

paullj1 commented 6 years ago

You won’t see one. That’s inside the container. Is it working now? Also, you didn’t modify the source did you? On Sat, May 26, 2018 at 14:12 ElJefe notifications@github.com wrote:

looking at my file system, there is no folder /opt/hta

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/mcpa-stlouis/hack-the-arch/issues/52#issuecomment-392282336, or mute the thread https://github.com/notifications/unsubscribe-auth/AIb5B7nGGdEml4I51CRLKIgxeGBxzXF6ks5t2akEgaJpZM4UM6fB .

eljeffeg commented 6 years ago

I reran the .start_docker.sh and now it's working correctly. No modifications to the source were made.

eljeffeg commented 6 years ago

Couple things to add.. the settings have an option "Subtract hint deductions before problem is solved", but I don't see any place on the Problem page to add Hints for the question. Also, I didn't see an value for the hints, which I expect would be problem specific if you have that option enabled.

Also, here is a formatting issue which I saw on Firefox and Chromium.

screen shot 2018-05-27 at 9 02 54 am
eljeffeg commented 6 years ago

I think the checkbox problem may be the width. I set the checkbox width: 16px and it fixed it, where doing things like float: left, span did nothing.

paullj1 commented 6 years ago
  1. Great!
  2. Hints are added in the hint tab on the problem view
  3. The formatting issue is only on the admin view in some browsers. Feel free to fix it (but make sure it works in all browsers) and submit a pull request! On Sun, May 27, 2018 at 08:36 ElJefe notifications@github.com wrote:

I think the checkbox problem may be the width. I set the checkbox width: 16px and it fixed it, where doing things like float: left, span did nothing.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/mcpa-stlouis/hack-the-arch/issues/52#issuecomment-392331617, or mute the thread https://github.com/notifications/unsubscribe-auth/AIb5B1nfPTimp4-7w3hyS8GLCrm_fNpNks5t2qv0gaJpZM4UM6fB .

eljeffeg commented 6 years ago

I don't see a hint tab in problem view. My pages look the same as https://github.com/mcpa-stlouis/hack-the-arch/wiki/Screenshots

paullj1 commented 6 years ago

Click on "Problems" at the top, then expand one of the problems (like in this screenshot: https://github.com/mcpa-stlouis/hack-the-arch/wiki/Screenshots#description). If you're signed in as the admin, there will be a hint tab.

On Mon, May 28, 2018 at 7:01 AM ElJefe notifications@github.com wrote:

I don't see a hint tab in problem view. My pages look the same as https://github.com/mcpa-stlouis/hack-the-arch/wiki/Screenshots

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/mcpa-stlouis/hack-the-arch/issues/52#issuecomment-392508461, or mute the thread https://github.com/notifications/unsubscribe-auth/AIb5B2VupJ93MW0yPQCkwrMJOlcfpD0bks5t2-cQgaJpZM4UM6fB .

eljeffeg commented 6 years ago

Ok, I didn't realize that the problem bar expanded. Sort of expect to add hints on the edit page. And not sure where to create hints as it seems to be pulling from a list created elsewhere, which seems weird as I don't expect people will often reuse the same hint. Might want to rethink the organization on that one.

eljeffeg commented 6 years ago

Seems the Visible button goes to the same place as the Edit button. Maybe Visible could expand the problem instead.

paullj1 commented 6 years ago
  1. Indeed. Thanks for the feedback. You're not the first person to mention this, but ultimately, it's just exposed to the admin, and it makes sense to me. If it's really that confusion, you have the option of programmatically creating all of your hints and challenges by interacting with the rails console (it's much easier than it sounds). The hint re-use use-case is for a generic first hint that might say "no hints available", or "this first one was free... after this it will cost you." Feel free to make it better and submit a pull request.
  2. Not sure what you mean here... those buttons aren't visible to the competitor, so making one of them expand the problem doesn't work. Just click the title of the challenge to expand. If there's an issue with formatting, again, feel free to submit a pull-request... it looks fine in Safari and Chrome.

On Mon, May 28, 2018 at 7:21 AM ElJefe notifications@github.com wrote:

Ok, I didn't realize that the problem bar expanded. Sort of expect to add hints on the edit page. And not sure where to create hints as it seems to be pulling from a list created elsewhere, which seems weird as I don't expect people will often reuse the same hint. Might want to rethink the organization on that one.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/mcpa-stlouis/hack-the-arch/issues/52#issuecomment-392512556, or mute the thread https://github.com/notifications/unsubscribe-auth/AIb5B3N39UIy79O5pwifxWWuXUnqUvtPks5t2-uygaJpZM4UM6fB .

paullj1 commented 6 years ago

Nothing heard on the original issue; feel free to re-open if you make the changes!