Skip to content

Commit

Permalink
chore: fix script errors
Browse files Browse the repository at this point in the history
Set correct variable reference
Add missing environment alias
  • Loading branch information
Genyus committed Jul 24, 2023
1 parent 69b96d8 commit 9d6b8e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/update-quizzes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ url=($(wp @$environment site list --blog_id=${blog_id} --field=url | sed -E 's|h
post_id_list=($(wp @$environment post list --post_type=sfwd-quiz --field=ID --url=${url}))

echo "Updating quizzes in $environment environment"
wp @$environment db query "UPDATE wp_${blogid}_learndash_pro_quiz_master SET disabled_answer_mark = 1"
wp @$environment db query "UPDATE wp_${blog_id}_learndash_pro_quiz_master SET disabled_answer_mark = 1"

for post_id in ${post_id_list[@]}; do
echo "Updating quiz ID:${post_id}"
wp post meta patch update ${post_id} _sfwd-quiz sfwd-quiz_disabledAnswerMark true --url=${url} --format=json
wp @$environment post meta patch update ${post_id} _sfwd-quiz sfwd-quiz_disabledAnswerMark true --url=${url} --format=json
done

0 comments on commit 9d6b8e6

Please sign in to comment.